Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is but another way to do it all. This example uses the jQuery <i>validate</i> plugin. Here, all the form fields are validated automatically. Download <i>jquery</i> from here :</p> <p><a href="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" rel="nofollow">https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js</a></p> <p>Download <i>validation plugin</i> from here : </p> <p><a href="http://jquery.bassistance.de/validate/jquery-validation-1.10.0.zip" rel="nofollow">http://jquery.bassistance.de/validate/jquery-validation-1.10.0.zip</a></p> <pre><code> &lt;script type="text/javascript" src="jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery.validate.1.7.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#customForm").validate({ debug: false, rules: { name: {required:true,minlength:8,maxlength:8}, email: {required:true,email:true}, }, submitHandler: function(form) { // do other stuff for a valid form $('#rsltx').html('&lt;img src="WhiteLoading.gif"&gt; Processing... please wait'); $.post('post.php', $("#customForm").serialize(), function(data) { $('#rsltx').html(data); }); } }); }); &lt;/script&gt; &lt;form method="post" id="customForm" action=""&gt; &lt;div&gt; &lt;label for="name"&gt;Name&lt;/label&gt; &lt;input id="name" name="name" type="text" autocomplete="off" required/&gt; &lt;/div&gt; &lt;div&gt; &lt;label for="email"&gt;E-mail&lt;/label&gt; &lt;input id="email" name="email" type="email" autocomplete="off" required/&gt; &lt;/div&gt; &lt;div&gt; &lt;input id="send" name="send" type="submit" value="Send" /&gt; &lt;/div&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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