markgargan
Programmer
Hey folks,
A page has a number of forms with a different submit button
for each.
Is there anyway of handling the onSubmit() function so that
we retrieve and send to the next page, the name of the form
which was submitted and the name of the button.
the code might look something along the lines of this.
function onSubmit() {
<!-- Get the name of the form that was submitted -->
formName = document.getNameSubmittedForm();
<!-- Get the name of the button that was pressed-->
buttonName = document.getFormSubmitted().getButtonPressed();
<!-- Insert in the variable 'formName' the eh.. formName-->
document.getForm(formName)['formName'] = formName;
<!-- Insert in the variable 'buttonPressed' the name of the button pressed-->
document.getForm(formName)['buttonPressed'] = buttonPressed;
document.getForm(formName).submit();
}
Any help would be greatly appreciated.
Thanks,
Mark.
A page has a number of forms with a different submit button
for each.
Is there anyway of handling the onSubmit() function so that
we retrieve and send to the next page, the name of the form
which was submitted and the name of the button.
the code might look something along the lines of this.
function onSubmit() {
<!-- Get the name of the form that was submitted -->
formName = document.getNameSubmittedForm();
<!-- Get the name of the button that was pressed-->
buttonName = document.getFormSubmitted().getButtonPressed();
<!-- Insert in the variable 'formName' the eh.. formName-->
document.getForm(formName)['formName'] = formName;
<!-- Insert in the variable 'buttonPressed' the name of the button pressed-->
document.getForm(formName)['buttonPressed'] = buttonPressed;
document.getForm(formName).submit();
}
Any help would be greatly appreciated.
Thanks,
Mark.