javascript - dojo toolkit closing external dialog -
javascript - dojo toolkit closing external dialog -
i'm trying since yesterday how close external dialog after click on button
this shows dialog:
<div id="external_dialog" data-dojo-type="dijit.dialog" title="edytuj dane firmowe" href="/external/dialog" style="overflow:auto; width: 365px; height: 280px;"> </div> and dialog in external file simple form
<form data-dojo-type="dijit.form.form"> <script type="dojo/event" data-dojo-event="onsubmit" data-dojo-args="e"> dojo.stopevent(e); if(!this.isvalid()){ return; } $.post('ajax/something', {name: $('#fm-name').val()}, function() { alert('ok') }); </script> <table cellpadding="0" cellspacing="2" style="width: 330px"> <tr> <td valign="top"><strong>company name: </strong></td> <td><input type="text" required="true" name="name" id="fm-name" placeholder="" dojotype="dijit.form.validationtextbox"/></td> </tr> </table> <input type="submit" value="submit" id="fc-submit" dojotype="dojox.form.busybutton" label="submit" busylabel="please wait..." /> <input type="button" value="close" label="close" id="fc-close" dojotype="dijit.form.button"} /> </form> btw. submit works perfectly, should related close button?
best regards
you can reference of dialog first using dijit.byid, utilize hide function hide dialog.
in click event handler of close button, try
dijit.byid('external_dialog').hide(); javascript dojo
Comments
Post a Comment