Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to slow down the modal dialog and submit an email form
    text
    copied!<p>when I click the submit button, the dialog box flashes on the screen instead of taking 3 seconds to fade out. i am new js and jquery, so please dumb your answer down for me so that I can understand. :) Here is my <strong>(EDITTED 9/1</strong>) code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;META http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"&gt; &lt;/script&gt; &lt;script src="http://recp.rm04.net//ui/library/formValidate.js" language="javascript"&gt; &lt;/script&gt; &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui- lightness/jquery-ui.css" rel="stylesheet" type="text/css"&gt; &lt;STYLE TYPE="text/css"&gt; BODY, .BODY, TD { color: ; font-size: ; font-family: ; font-weight: ; text-decoration: ; font-style: ; } &lt;/STYLE&gt; &lt;/head&gt; &lt;body vlink="" alink="" link="" bgcolor=""&gt; &lt;!-- demo --&gt; &lt;div class="demo"&gt; &lt;div id="dialog" title="Basic dialog"&gt; &lt;p&gt;Email submitted successfully. Thank you for signing up!&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- End demo --&gt; &lt;br&gt; &lt;br&gt; &lt;table border="0" cellspacing="0" cellpadding="5"&gt; &lt;form name="form" method="post" action="http://links.mkt41.net/servlet/UserSignUp? f=755449&amp;postMethod=HTML&amp;m=0&amp;j=MAS2"&gt; &lt;tr&gt; &lt;td valign="top"&gt;&lt;span style="color:#CC0000"&gt;*&lt;/span&gt;&lt;/td&gt;&lt;td valign="top" align="left"&gt;Email:&lt;/td&gt; &lt;td&gt;&lt;input type="hidden" name="EMAIL_REQUIRED" value="T"&gt;&lt;input type="hidden" name="EMAIL_DATATYPE" value="email"&gt;&lt;input type="text" name="EMAIL" value="" maxlength="4000"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/form&gt; &lt;form&gt; &lt;tr&gt; &lt;td align="center" colspan="3"&gt; &lt;!--&lt;div id="opener"&gt; --&gt; &lt;input type="button" name="submit" value="Submit" onClick="f_validateForm()"&gt; &lt;!--&lt;/div&gt; --&gt; &lt;script language="javascript"&gt; $( "#dialog" ).dialog({ autoOpen: false, show: "fade", hide: "fade", open: function() { var dlg = $(this); setTimeout(function(){ dlg.dialog("close"); }, 3000); }, modal: true, opacity: 1 }); $('form').submit(function() { e.preventDefault(); $.post('http://links.mkt41.net/servlet/UserSignUp? f=755449&amp;postMethod=HTML&amp;m=0&amp;j=MAS2&amp;EMAIL_REQUIRED=T&amp;EMAIL_DATATYPE=email', { EMAIL: $('input[name=EMAIL]').val() }, function (data) { $( "#dialog" ).dialog( "open" ); }); }); &lt;/script&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/form&gt; &lt;/table&gt; &lt;p&gt; &lt;/p&gt; &lt;script&gt;f_initializeForm();&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload