M
Matt
The ASP page has multiple buttons, and when the user clicks different
buttons, it will submit the form data to different URLs.
My first approach was to use BUTTON type, and triggers javascript function
to submit the form data. However, it didn't work properly and I changed to
use SUBMIT type.
<INPUT TYPE="BUTTON" NAME="action1" VALUE="Return to Main Search Page"
onClick="action1()">
function action1()
{ //etc...
document.myform.action = "main.asp"
document.myform.submit();
}
OR
<INPUT TYPE="SUBMIT" NAME="action1" VALUE="Return to Main Search Page"
onClick="action1()">
function action1()
{ //etc...
document.myform.action = "main.asp"
}
So which is the appropriate way? please advise. thanks!!
buttons, it will submit the form data to different URLs.
My first approach was to use BUTTON type, and triggers javascript function
to submit the form data. However, it didn't work properly and I changed to
use SUBMIT type.
<INPUT TYPE="BUTTON" NAME="action1" VALUE="Return to Main Search Page"
onClick="action1()">
function action1()
{ //etc...
document.myform.action = "main.asp"
document.myform.submit();
}
OR
<INPUT TYPE="SUBMIT" NAME="action1" VALUE="Return to Main Search Page"
onClick="action1()">
function action1()
{ //etc...
document.myform.action = "main.asp"
}
So which is the appropriate way? please advise. thanks!!