Issue
part of my HTML code:
<form method="post" id="form">
<input type="number" min="0" max="20" id="experience" required name="experience"title="experience" class="formfield" />
<input type="image" id="registersubmit4" name="registersubmit4" src="images/arrow-right.png" title="next"/>
</form>
I want to submit form when user clicks on next and after submitting, then move to the next page.
<input type="image">
works well for submitting but after submitting i want to move to the next page..
I used javascript for onclick() event as follows:
<input type="image" onclick=form.submit(); "location='next.html'">
this does not work. Please help...Thanks in advance.
Solution
This is usually done by specifying an action on the form:
<form method="post" action="newpage.html" id="form">
...but if the page processing your form is different than the page you want to go to, you'd use a server-side redirect. How this works will depend on the server-side language you are using.
Answered By - Diodeus - James MacFarlane
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.