flnMichael
Programmer
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 "SaveAndQuit.asp" page, and I assume without the form.submit() it won't send the data. How do I do this?
Thanks
Mike
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 "SaveAndQuit.asp" page, and I assume without the form.submit() it won't send the data. How do I do this?
Thanks
Mike