sum1hor sum1hor - 6 months ago 8
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

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.

Comments