One Javascript Line Causes the Rest of the File to Not Function
<p>I have a Javascript file that I use to check the input of a form. However, when I uncomment the commented line, the javascript file does not function properly, and the form is submitted even if some of the fields are blank. In fact, the Javascript file doesn't even make it to the second alert function. What is going on?</p>

<pre><code>function checkLogin()
{
    alert("HERE");
    //document.getElementById("errors").style.display = "none";
    var form = document.getElementById("form1");
    var problems = false;
    document.getElementById("errorJS").style.display = "none";
    document.getElementById("errorJS").innerHTML = "";
    alert("test");
    if(form.email.value.length &lt; 1)
    {
        document.getElementById("errorJS").innerHTML += "Please enter your email address. &lt;br /&gt;";
        problems = true;
        document.getElementById("errorJS").style.display = "block";
    }
    if(form.pword.value.length &lt; 1)
    {
        document.getElementById("errorJS").innerHTML += "Please enter your password.";
        problems = true;
        document.getElementById("errorJS").style.display = "block";
    }
    alert(!(problems));
    return !(problems);
}
</code></pre>

<p>That was it, the line was returning null. Thank you for the answers.</p>
