 <p>Try this,</p> <pre><code>var user = document.myForm.un.value; </code></pre> <p>I'm not sure if you've already heard of JQuery but I would recommend you use it. Check this out <a href="http://jquery.com/" rel="nofollow">http://jquery.com/</a>.</p>