T
Tim
Hello All!
I'm having a difficult problem and I'm wondering if anyone can help.
Here's the deal.
I have a webpage with multiple forms on it. All of the forms have drop
down boxes that when selected and the corresponding button is pressed, the
user should be taken to a new website.
However, since I have 41 forms and 41 corresponding checkboxes, I would
like one function that can manage the 41 different forms.
Here's what I've tried so far, but it doesn't work. drop_num would be
the number of the form involved. In this case, all 41 forms are named as
follows: the first form is named Form1, the second Form2 and so forth all
the way till Form41. The drop down boxes are named as follows: the first
WebPage1, second WebPage2, etc.
The buttons activate the ChangeURL function with the OnClick() function.
function ChangeURL(drop_num)
{
if (navigator.appName.indexOf('Netscape') > -1) {
location.href = drop_num + "." + "WebPage" + drop_num + "." + "options["
+ drop_num + "." + "WebPage" + drop_num + "." + "selectedIndex].value";
}
else {
location.href = drop_num + "." + "WebPage" + drop_num + "." + "value";
}
}
Thanks in advance,
Tim
I'm having a difficult problem and I'm wondering if anyone can help.
Here's the deal.
I have a webpage with multiple forms on it. All of the forms have drop
down boxes that when selected and the corresponding button is pressed, the
user should be taken to a new website.
However, since I have 41 forms and 41 corresponding checkboxes, I would
like one function that can manage the 41 different forms.
Here's what I've tried so far, but it doesn't work. drop_num would be
the number of the form involved. In this case, all 41 forms are named as
follows: the first form is named Form1, the second Form2 and so forth all
the way till Form41. The drop down boxes are named as follows: the first
WebPage1, second WebPage2, etc.
The buttons activate the ChangeURL function with the OnClick() function.
function ChangeURL(drop_num)
{
if (navigator.appName.indexOf('Netscape') > -1) {
location.href = drop_num + "." + "WebPage" + drop_num + "." + "options["
+ drop_num + "." + "WebPage" + drop_num + "." + "selectedIndex].value";
}
else {
location.href = drop_num + "." + "WebPage" + drop_num + "." + "value";
}
}
Thanks in advance,
Tim