Crashin
03-19-2004, 10:08 PM
I've got the following function:
// function to cancel and return to account display page
function cancel_form(formName) {
document.formName.submit();
}
And the following function call:
<input type="button" name="submitIt" value="Cancel" onclick="return cancel_form('customerSuggestion')">
However, I get the following error when trying to use it:
Error: 'document.formName' is null or not an object
How do I get the function to recognize my form's name in the statement? (Without hard-coding it...)
Thanks for the help!
// function to cancel and return to account display page
function cancel_form(formName) {
document.formName.submit();
}
And the following function call:
<input type="button" name="submitIt" value="Cancel" onclick="return cancel_form('customerSuggestion')">
However, I get the following error when trying to use it:
Error: 'document.formName' is null or not an object
How do I get the function to recognize my form's name in the statement? (Without hard-coding it...)
Thanks for the help!