A javascript menu (2 way) which doesn't work in any other browser than Internet Explorer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ken_Hawk
Posted On:   Thursday, February 20, 2003 12:48 AM

// define global arrays for child select boxes var aChildListOptions1; var aChildListOptions2; function Initialize() { // retrieve number of options in parent select box var iParentListOptionsNum = document.forms('isc').elements ('parentList').options.length; // initialize child select boxes aChildListOptions1 = new Array(iParentListOptionsNum); aChildListOptions2 = new Array(iParentListOptionsNum); for (var i = 0; i aChildListOptions1[i] = new Array(); aChildListOptions2[i] = new Array(); } // initialize data needed to populate option list of first child select box aChildListOptions1[0][0] = new Option('Northern Sport Fishing', 'http://www.duenorth.net/northernsportfishing'); aChildListOptions1[0][1] = new Option('Mikisew Sportfishin   More>>

Could somebody please tell me why this Javascript menu dividing 2 separate selection boxes; is working with Internet Explorer but not with Netscape or any Apple Macintosh Browser (including Internet Explorer), Javascript is enabled in all browsers: Problem description: the menu's [1] and [2] will not show the new links when you click on a new 'Region' in menu [0]


   <<Less

Re: A javascript menu (2 way) which doesn't work in any other browser than Internet Explorer

Posted By:   Nitesh_Naveen  
Posted On:   Thursday, February 20, 2003 02:26 AM

Please format code blocks before posting... Found the following problems other than the badly mangled code!!!
1. Form tag missing
2. javascript: usage incorrect (and it is not required in onclick handlers)
3. forms and elements are arrays and not functions. Usage here is like a function call.
Here is the modified code which works in all borwsers...












Region/State:

Fishing links: About the Region


Special Fishing Accomodations:





About | Sitemap | Contact