Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Submit and Redirect At the Same Time

Status
Not open for further replies.

williadn48

Programmer
Oct 27, 2006
29
US
When the user clicks Stop I want to write to the database with a submit AND redirect to a different page. I have tried various combos of code and nothing is working.
function fncStop(){

frmTIMETRACKING.hdnAction.value = 'Stop';

frmTIMETRACKING.submit();
window.location = 'TaskLogged.asp';}
<FORM action="ECM-Time-Tracking.asp" method=post id=frmTIMETRACKING name=frmTIMETRACKING onSubmit="return fncStop()">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top