grace422
02-11-2007, 12:20 AM
I have a page: http://www.sunelectricsystems.com/Commercial/com-ground-mounted.htm
http://www.sunelectricsystems.com/style1.css
http://www.sunelectricsystems.com/drop_down.js
Obviously having 2 #nav ID's is invalid code. I am trying to find a way to have two drop downs on the same page. One for the top menu, and one for the bottom menu.
I have tried to change the getElementById to getElementByClass, and the corresponding nav variable in the style sheet. This works for FireFox and IE 7, but not IE 6
The next solution I thought of was to make 2 java scripts and ID's, one for each menu (e.g.: #nav for drop_down, and #nav-again for drop_down2). Problem is, I don't know how to tell the page to run both drop_down.js and drop_down2.js on the same page. I have tried a bunch of ways to tell it to run both scripts, with no luck.
This:
<script type="text/javascript" src="../drop_down.js"></script>
<script type="text/javascript" src="../drop_down2.js"></script>
Allows only the top script to run.
Is there a way I can tell IE 6 to run either drop_down or drop_down2, depending on the variable?
Or is there a way I can get IE 6.0 to accept getElementByClass?
http://www.sunelectricsystems.com/style1.css
http://www.sunelectricsystems.com/drop_down.js
Obviously having 2 #nav ID's is invalid code. I am trying to find a way to have two drop downs on the same page. One for the top menu, and one for the bottom menu.
I have tried to change the getElementById to getElementByClass, and the corresponding nav variable in the style sheet. This works for FireFox and IE 7, but not IE 6
The next solution I thought of was to make 2 java scripts and ID's, one for each menu (e.g.: #nav for drop_down, and #nav-again for drop_down2). Problem is, I don't know how to tell the page to run both drop_down.js and drop_down2.js on the same page. I have tried a bunch of ways to tell it to run both scripts, with no luck.
This:
<script type="text/javascript" src="../drop_down.js"></script>
<script type="text/javascript" src="../drop_down2.js"></script>
Allows only the top script to run.
Is there a way I can tell IE 6 to run either drop_down or drop_down2, depending on the variable?
Or is there a way I can get IE 6.0 to accept getElementByClass?