Hello all..
here's what im trying to accomplish... i have 3-4 different forms on several pages... when each one is submitted, i want to be able to call a function that refernces that forms specific name, ex. document.form1.submit();
as opposed to using this.form, i thought i could accomplish it with something similar to:
<input type='image' src='img/button_go.gif' onclick='return showWaiting(form1);'>
function showWaiting(formname)
{
document.forms["formname"].submit();
}
OR
function showWaiting(formname)
{
document.formname.submit();
}
bottom line, is there a way to reuse a function, to submit multiple forms, and have the form name be sent as a paramater to the function, vs. hard coded...
thanks!
here's what im trying to accomplish... i have 3-4 different forms on several pages... when each one is submitted, i want to be able to call a function that refernces that forms specific name, ex. document.form1.submit();
as opposed to using this.form, i thought i could accomplish it with something similar to:
<input type='image' src='img/button_go.gif' onclick='return showWaiting(form1);'>
function showWaiting(formname)
{
document.forms["formname"].submit();
}
OR
function showWaiting(formname)
{
document.formname.submit();
}
bottom line, is there a way to reuse a function, to submit multiple forms, and have the form name be sent as a paramater to the function, vs. hard coded...
thanks!