Note that there are some explanatory texts on larger screens.

plurals
  1. POForm validation !='' in if statement?
    primarykey
    data
    text
    <p>Can anyone tell me whats wrong with this code, im validating a form making sure all the fields have text in them before anyone can submit. everything works until i put in the <code>!='' var.</code> I am sure the id's are correct </p> <pre><code>&lt;script src="jquery.js" type="text/javascript" language="javascript"&gt;&lt;/script&gt; &lt;script language="javascript"&gt; $(document).ready(function() { // declare the flags outside the other functions var username_ready = false; var email_ready = false; function checkSubmitStatus() { var emailvalue = $("#email").val(); var usernamevalue = $('#username').val(); var firstvalue = $('#first').val(); var lastvalue = $('#last').val(); var passwordvalue = $('#password').val(); if (username_ready &amp;&amp; email_ready &amp;&amp; emailvalue!='' &amp;&amp; usernamevalue!='' &amp;&amp; firstvalue!='' &amp;&amp; lastvalue!='' &amp;&amp; passwordvalue!=''){ $("#register").prop('disabled',false); } else {$("#register").prop('disabled',true);} } </code></pre> <p>and here is my form code so you can see if thats the issue...</p> <pre><code>&lt;p&gt;First Name: &lt;input id="first" type="text" name="name" maxlength="100"&gt; &lt;/p&gt; &lt;p&gt;Last Name: &lt;input id="last" type="text" name="name" maxlength="100"&gt; &lt;/p&gt; &lt;p&gt; Email: &lt;input type="text" name="email" id="email" maxlength="100" /&gt; &lt;span id="box" style="display:none"&gt;&lt;/span&gt;&lt;/p&gt; User Name : &lt;input name="username" type="text" id="username" value="" maxlength="15" /&gt; &lt;span id="msgbox" style="display:none"&gt;&lt;/span&gt; &lt;p&gt; Password: &lt;input id="password" type="password" name="password"&gt; &lt;/p&gt; </code></pre> <p></p>
    singulars
    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.
 

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