How to have <select onchange="this. form.submit()"a nd also a Submit
button on one form?
I have something like this:
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"
enctype="multip art/form-data" name="form1">
<select onchange="this. form.submit();" name="prod">
<option value="">Select product</option>
<option value="12">abc</option>
</select>
<input type="submit" name="submit" value="Submit" />
</form>
In the above code, this.form.submi t() within the <selectdoes not
have any effect. The submit button works fine.
But when I removed the submit button from the <form>, the
this.form.submi t() works fine.
How can I have both form submissions within a single form?
Thanks!
button on one form?
I have something like this:
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"
enctype="multip art/form-data" name="form1">
<select onchange="this. form.submit();" name="prod">
<option value="">Select product</option>
<option value="12">abc</option>
</select>
<input type="submit" name="submit" value="Submit" />
</form>
In the above code, this.form.submi t() within the <selectdoes not
have any effect. The submit button works fine.
But when I removed the submit button from the <form>, the
this.form.submi t() works fine.
How can I have both form submissions within a single form?
Thanks!
Comment