I have inherited a project and there is a form with 3 buttons:
<input type="submit" id="ctl00_contentPlaceHolder_back" value="Make Changes" name="ctl00$contentPlaceHolder$back" onClick="history.back();">
<input type="submit" id="ctl00_contentPlaceHolder_preview" value="View Outside" name="ctl00$contentPlaceHolder$preview">
<input type="submit" id="ctl00_contentPlaceHolder_submit" value="Send Card" name="ctl00$contentPlaceHolder$submit">
How do I make it so, that only 1 button actually submits the form to another page for processing?
I have inherited a project and there is a form with 3 buttons:
<input type="submit" id="ctl00_contentPlaceHolder_back" value="Make Changes" name="ctl00$contentPlaceHolder$back" onClick="history.back();">
<input type="submit" id="ctl00_contentPlaceHolder_preview" value="View Outside" name="ctl00$contentPlaceHolder$preview">
<input type="submit" id="ctl00_contentPlaceHolder_submit" value="Send Card" name="ctl00$contentPlaceHolder$submit">
How do I make it so, that only 1 button actually submits the form to another page for processing?
Share Improve this question edited Feb 8, 2011 at 16:16 Kris Erickson 33.9k26 gold badges121 silver badges179 bronze badges asked Feb 8, 2011 at 14:59 KeithKeith 26.5k36 gold badges98 silver badges129 bronze badges3 Answers
Reset to default 8Change all the other ones to type="button"
Change the input type="button" instead of type="submit". These kind of look like ASP controls, so find and replace these form buttons with a plain button, unbound.
By not letting them be submit buttons. Use type="button"
instead of type="submit"
.