sum1hor sum1hor - 1 year ago 85
Javascript Question

Div not submitting form

i've tried a lot of different methods to get this done, however none actually worked any suggestions? Thanks

<div name="login" class="blue_button" onclick="
document.getElementById("form").submit();"><div class="blue_button_text noselect">Login</div></div>

Answer Source

Are you sure that you've declared the form with the <form> tag? Also, try to change the tag of the submit button from <div> to <button> or <input>. Makes more sense semantically.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download