Seven^3
01-09-2003, 03:07 AM
I need to change the action of an automatically generated form if it's current action (calling a particular CGI script) is invalid.
Here's what I'ver got so far:function altAction (){
var whichIs = document.getElementsByName('dropdown').action;
if (whichIs.indexOf('siteadmin') != -1){
document.getElementsByName('dropdown').action = 'http://...';
}
} The only thing I can't figure out is how to call the function so it actually works (putting an onLoad the <body> tag didn't work, btw).
Here's what I'ver got so far:function altAction (){
var whichIs = document.getElementsByName('dropdown').action;
if (whichIs.indexOf('siteadmin') != -1){
document.getElementsByName('dropdown').action = 'http://...';
}
} The only thing I can't figure out is how to call the function so it actually works (putting an onLoad the <body> tag didn't work, btw).