Question
Help with buttons
I have a form with the following three buttons. Originally,
the back and home buttons were images with an a hef tag, and the
second button submitted the form to an action page, after
javascript edits. So I am mixing buttons and images, and everything
works fine.
I have been told to do away with the images and make everything buttons, so I named the three buttons 1, 2, and 3 and sent everything to my action page, and did a cfif isdefined for each button, then did a cflocation url to pass to the apppropriate pages. That works ok.
But is there a way to do it without sending the first and third buttons to the action page, and only send the second one ?
This is what I have so far. The back button works, the second button still submits and validates, but I do not know how to code the third button, which should take me to the page index.cfm, when I click on it.
What is the proper syntax for this ? Thanks
<td align="center">
<INPUT TYPE="button" name="button_1" VALUE=" Back " onClick="history.go(-1)">
</td>
<td align="center">
<input type="button" name="button_2" value=" Upload File " onClick="validateForm(document.upload_form)">
</td>
<td align="center">
<input type="button" name="button_3" value=" Home " onClick="index.cfm">
</td>
I have been told to do away with the images and make everything buttons, so I named the three buttons 1, 2, and 3 and sent everything to my action page, and did a cfif isdefined for each button, then did a cflocation url to pass to the apppropriate pages. That works ok.
But is there a way to do it without sending the first and third buttons to the action page, and only send the second one ?
This is what I have so far. The back button works, the second button still submits and validates, but I do not know how to code the third button, which should take me to the page index.cfm, when I click on it.
What is the proper syntax for this ? Thanks
<td align="center">
<INPUT TYPE="button" name="button_1" VALUE=" Back " onClick="history.go(-1)">
</td>
<td align="center">
<input type="button" name="button_2" value=" Upload File " onClick="validateForm(document.upload_form)">
</td>
<td align="center">
<input type="button" name="button_3" value=" Home " onClick="index.cfm">
</td>
