ejrhodes
05-13-2003, 02:05 PM
Guys,
Here is my current code:
<form method="POST" action="pm.asp">
<td align="center">
<input type="text" name="ID" size="5" maxlengh="5"><br>
<input src="images/edit_btn.gif" type="image" alt="Edit Project" onClick="this.form.action.value='editproject';">
<input src="images/ezedit_btn.gif" type="image" alt="EZ edit" onClick="this.form.action.value='ezedit';">
<input src="images/jco_btn.gif" type="image" alt="Edit JCO" onClick="this.form.action.value='editjco';">
<input src="images/finance_btn.gif" type="image" alt="Edit Finance" onClick="this.form.action.value='editfinance';">
<input src="images/enumber_btn.gif" type="image" alt="eNumber" onClick="this.form.action.value='enumber';">
<input src="images/report_btn.gif" type="image" alt="Report" onClick="this.form.action.value='projecttime';">
<input type="hidden" name="action" value=""> </form
The action that happens now is that when the image is clicked, the hidden form attribute action is populated and the page that is called uses that action form value to make decisions. What I am wondering is it is possible to change the URL that the form posts to on click as well?
ie
On EZ EDit Click
Hidden Value="ezedit"
URL="test.asp"
but
Finance on Click
Hidden Value="finance"
URL="financetest.asp"
I realize that there is an action on the form and an action hidden form value in this case. Any suggestions?
Here is my current code:
<form method="POST" action="pm.asp">
<td align="center">
<input type="text" name="ID" size="5" maxlengh="5"><br>
<input src="images/edit_btn.gif" type="image" alt="Edit Project" onClick="this.form.action.value='editproject';">
<input src="images/ezedit_btn.gif" type="image" alt="EZ edit" onClick="this.form.action.value='ezedit';">
<input src="images/jco_btn.gif" type="image" alt="Edit JCO" onClick="this.form.action.value='editjco';">
<input src="images/finance_btn.gif" type="image" alt="Edit Finance" onClick="this.form.action.value='editfinance';">
<input src="images/enumber_btn.gif" type="image" alt="eNumber" onClick="this.form.action.value='enumber';">
<input src="images/report_btn.gif" type="image" alt="Report" onClick="this.form.action.value='projecttime';">
<input type="hidden" name="action" value=""> </form
The action that happens now is that when the image is clicked, the hidden form attribute action is populated and the page that is called uses that action form value to make decisions. What I am wondering is it is possible to change the URL that the form posts to on click as well?
ie
On EZ EDit Click
Hidden Value="ezedit"
URL="test.asp"
but
Finance on Click
Hidden Value="finance"
URL="financetest.asp"
I realize that there is an action on the form and an action hidden form value in this case. Any suggestions?