Doing work after the submit form
I need to execute some code AFTER I execute a submit form command.
Is this possible?
In my code below, you can see that the submit button is just a button and not a true submit button. I do this so I can edit my fields for content. I need to execute extra code after the frmOpponents.submit line executes.
thanks for your help!
sal
here's my code:::::::::::::::::::::::::::::::::::::::::::::: :::
<form name="frmOpponents" method="post" action="addOpponents.asp">
<table width="544" border="0" cellspacing="0" cellpadding="5">
<tr><td class="body" width="168">Opponent Team Name:</td>
<td width="356"> <input name="txtOpponentName" type="text" id="txtOpponentName" size=55 maxlength=50 value=<% response.write strOpponentName%>></td></tr>
<tr align="center"><td align="left"> </td>
<td align="left"> <input type="button" name="cmdReturn" value="Return">
<input type="reset" name="cmdReset" value="Reset">
<input type="button" name="cmdSubmit" value="Submit">
</td>
</tr>
</table>
<br>
</form>
</html>
<SCRIPT LANGUAGE="VBSCRIPT">
Sub cmdSubmit_onclick()
if document.frmOpponents.txtOpponentName.value = "" then
msgbox "Please enter a valid name.",vbCritical,strWebPageName
document.frmOpponents.txtOpponentName.focus
exit sub
end if
frmOpponents.submit
End Sub
</SCRIPT>
|