modal dialog closing inmediatlyhttp://forums.asp.net/t/1801507.aspx/1?modal+dialog+closing+inmediatlyWed, 20 Feb 2013 16:33:22 -050018015074971146http://forums.asp.net/p/1801507/4971146.aspx/1?modal+dialog+closing+inmediatlymodal dialog closing inmediatly <p>hi everyone, i want some help, i don't know why a modal dialog that i'm creating, is closing without the user button click. what i'm doing wrong?</p> <p>this is the code of my modal dialog. thanks</p> <pre class="prettyprint">$('#dialog').dialog({ autoOpen: false, width: 400, modal: true, resizable: false, buttons: { &quot;Ok&quot;: function() { document.formAnLinea.submit(); $(this).dialog(&quot;close&quot;); }, &quot;Cancelar&quot;: function() { $(this).dialog(&quot;close&quot;); } } }); $('form#formAnLinea').submit(function(e) { e.preventDefault(); $(&quot;p#dialogo-detalle&quot;).html(&quot;Linea: &quot; &#43; $(&quot;input#tbLinea&quot;).val() &#43; &quot;&lt;/br&gt;&quot; &#43; &quot;Codigo Lista: &quot; &#43; $(&quot;input#tbCodigoLista&quot;).val() &#43; &quot;&lt;/br&gt;&quot; &#43; &quot;Fecha Validez: &quot; &#43; $(&quot;input#tbFecha&quot;).val() &#43; &quot;&lt;/br&gt;&quot;); $('#dialog').dialog('open'); }); }); &lt;div id=&quot;dialog&quot; title=&quot;Verificar Borrado de Linea&quot;&gt; &lt;p&gt;&lt;span class=&quot;ui-icon ui-icon-alert&quot; style=&quot;float:left; margin:0 7px 0 0;&quot;&gt;&lt;/span&gt; Desea eliminar la linea del pedido numero: &lt;/p&gt; &lt;p id=&quot;dialogo-detalle&quot;&gt;&lt;/p&gt; &lt;p&gt;Si la informacion es correcta click en Ok.&lt;/p&gt; &lt;p&gt;Para cambiar, click en Cancel.&lt;/p&gt; &lt;/div&gt;</pre> <p><br> <br> </p> 2012-05-08T15:29:58-04:004972369http://forums.asp.net/p/1801507/4972369.aspx/1?Re+modal+dialog+closing+inmediatlyRe: modal dialog closing inmediatly <p>Hi,</p> <p>Code looks fine. You may be closing the dialog after loaded using some script somewhere. Or setting the container ofthe di to display none. Review your code.</p> 2012-05-09T09:01:02-04:005308654http://forums.asp.net/p/1801507/5308654.aspx/1?Re+modal+dialog+closing+inmediatlyRe: modal dialog closing inmediatly <p>Olá! Estou com o mesmo problema!</p> <p>Copiei o código de <a href="http://jqueryui.com/dialog/#modal-form">http://jqueryui.com/dialog/#modal-form</a>&nbsp;sem alterar nada.</p> <p>Porem ele abre e fecha sozinho. Nem há tempo de digitar os dados nos campos!</p> <p>O que esta de errado? Seria algo do Asp.net?</p> <p>&nbsp;</p> <p>Aguardo.</p> <p>&nbsp;</p> <p><em>Hello! I'm having the same problem!</em></p> <p><em>I Copie&nbsp;code <a href="http://jqueryui.com/dialog/#modal-form">http://jqueryui.com/dialog/#modal-form</a>&nbsp;without changing anything.</em></p> <p><em>However it opens and closes itself. Nor is there time to enter data in the fields!</em></p> <p><em>What is wrong? It would be something of Asp.net?</em></p> <p><em>I wait.</em></p> 2013-02-20T16:33:22-05:00