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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending form to multiple pages

Status
Not open for further replies.

flnMichael

Programmer
Nov 13, 2003
96
US
I have a form with two style buttons...a "save and return" and a "quit" button. Now, with the quit button, I want to save the form, then close the window. The quit button will take you to a totally different page that will close the window once saved. Both the buttons are for the same form, how do I send the form data to two different pages? I've tried:
document.form.action = "SaveAndQuit.asp"

but it doesn't do anything.

function AskDone(form)
{
var myflag;
if(confirm("Are you done testing?"))
{
myflag = true;
checkvalues(form, myflag);
}

else
{
}
}

function checkvalues(form, myflag)
{
if (myflag == true)
{
document.form.action="SaveAndQuit.asp";
}

else
form.submit();
}

<form action='SaveForm.asp' method='post' id=form3 name=form3>

<input type='button' name='btnSubmit' value='Save and Return' onclick='checkvalues(this.form);'>

<input type='button' name='btnSubmit' value='Quit' onClick='AskDone(this.form);'>


With this, I need the information to be sent with the &quot;SaveAndQuit.asp&quot; page, and I assume without the form.submit() it won't send the data. How do I do this?

Thanks
Mike
 
Submit to the same page, from there determine if the window will close or return.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top