Javascript user ID code
<p>Here's the code:</p>

<pre><code>&lt;script language="javascript"&gt;
&lt;!--//
    function pasuser(form) {
        if (form.user.value=="JavaScript") { 
            if (form.pass.value=="Kit") {              
                location="page2.html" 
            } else {
                alert("Invalid Password")
            }
        } else {  
            alert("Invalid UserID")
       }
    }
//--&gt;
&lt;/script&gt;
</code></pre>

<p>I keep trying to use just the user ID and not the password but when I remove form.pass nothing works. Am I doing something wrong in the form section?</p>

<pre><code>&lt;input type="text" name="user" id="query" size="5" value=""&gt; 
&lt;input type="button" value="Search" onClick="pasuser(this.form)"&gt;
</code></pre>

<p>It seems like it would be pretty cut and dry. If I want to just input the user ID, just remove form.pass but that doesn't work. Ive used this script before with the user ID and the pass and it works fine. </p>

<p>Thanks in advance.</p>
