JavaScript error with html form submit
<pre><code>function formv(frm){

    alert(frm.username.value);

    document.myform.submit();
}

&lt;form action="http://localhost/CI/index.php/scontr/logs" method="post" name="myform"&gt;
        &lt;fieldset&gt;
        &lt;table&gt;
            &lt;tr&gt;
                &lt;td&gt;UserID:&lt;/td&gt;
                &lt;td&gt;&lt;input type="text" name="username" maxlength="30" value="" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td&gt;Password:&lt;/td&gt;
                &lt;td&gt;&lt;input type="password" name="password" maxlength="30" value="" /&gt;&lt;/td&gt;
            &lt;/tr&gt;

                            &lt;tr&gt;&lt;td&gt;
                            &lt;select name="myselect"&gt;
                            &lt;option value="one" &gt;Teacher&lt;/option&gt;
                            &lt;option value="two" &gt;Student&lt;/option&gt;
                            &lt;/select&gt;&lt;/td&gt;
                            &lt;/tr&gt;

            &lt;tr&gt;

                &lt;td colspan="2"&gt;&lt;input type="button" name="submit" onclick="formv(this.form)" value="Login" /&gt;&lt;/td&gt;
            &lt;/tr&gt;
</code></pre>

<p>Can anyone tell me why the above form is not being posted in the following address. The alert box is shown,  but then nothing happens. It remains in the same page</p>
