Changing CSS Properties Using Javascript
<p>For some reason this doesn't make the "errorJS" div visible. Can someone please help me?        </p>

<pre><code>function checkLogin()
    {
        document.getElementById("errors").style.display = "none";
        var form = document.getElementById("form1");
        var problems = false;
        document.getElementById("errorJS").innerHTML = "";
        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 = "box";
        }
        if(form.pword.value.length &lt; 1)
        {
            document.getElementById("errorJS").innerHTML += "Please enter your password.";
            problems = true;
            alert(document.getElementById("errorJS").style.display);
            document.getElementById("errorJS").style.display = "box";
        }
        return !(problems);
    }
</code></pre>

<p>Stupid me, I can't believe I made that mistake. I've been coding more too many straight hours. Thanks to all for the answers.</p>
