PDA

View Full Version : Switch Menu... is it possible to do this???



trickxster
11-25-2004, 03:15 AM
Good Day...

I used the switch menu script (http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm) and it works perfectly... however instead of using text links i'm using images... for the top menu...

I have noticed that you cannot have the cursor changed to a hand or anything else when you're using images... Soooooo....

I will like to know if it is possible to make it so that when a user scrolls over the man menu the cursor will change into a hand or something of the sort....

Thanks in advance

simonf
11-25-2004, 04:48 AM
Hi

have you tried the code style="cursor:hand; cursor:pointer" code in the style section. :cool:

trickxster
11-25-2004, 11:20 AM
Thanks for the reply but no luck... I put that tag in ever part of my style script... and the only thing that was able to change was the sub menus... is there another way... you can check what i've done by going here (http://www.telcellsxm.com/newsite/faq.php) and viewing the source code in the head section...

Is there another way to do this???

ddadmin
11-30-2004, 10:17 PM
Hmmm it should work. Using your HTML as an example:


<img src="http://www.telcellsxm.com/newsite/images/buttons_03.gif" width="127" height="26" onclick="SwitchMenu('sub3')" style="cursor: hand; cursor:pointer">

trickxster
12-16-2004, 01:43 PM
Hi... I'm still haveing this problem... is their anyone out there in dynamicdrive land that can help me out???

ddadmin
12-16-2004, 10:07 PM
Do you mean you still don't get a hand cursor, even after using the code I pasted above? If so, please provide a URL to your problematic page.

Minos
12-30-2004, 07:29 PM
Hmmm it should work. Using your HTML as an example:


<img src="http://www.telcellsxm.com/newsite/images/buttons_03.gif" width="127" height="26" onclick="SwitchMenu('sub3')" style="cursor: hand; cursor:pointer">

He's right, but here's the solution: The code is wrong. Here's how the bar should be set-up.


<!-- Button One! //-->
<div class="menutitle" onclick="SwitchMenu('sub2')" onMouseOver="this.className='menutitle2'" onMouseOut="this.className='menutitle'">Industrial</div>
<span class="submenu" id="sub2">
<a href="http://www.sequal.com/industrialoxygenproducts.htm" target="mainWindow">Oxygen</a><br>
<a href="http://www.sequal.com/industrialnitrogengproducts.htm" target="mainWindow">Nitrogen</a><br>
<a href="http://www.sequal.com/industrialairdryingproducts.htm" target="mainWindow">Air Dryer</a><br>
</span>

<!-- Button Two! //-->
<div class="menutitle" onclick="SwitchMenu('sub3')" onMouseOver="this.className='menutitle2'" onMouseOut="this.className='menutitle'">Medical</div>
<span class="submenu" id="sub3">
<a href="http://www.sequal.com/integraanalog5liter.htm" target="mainWindow">Integra</a><br>
<a href="http://www.sequal.com/integraanalog7liter.htm" target="mainWindow">IntegraSeven</a><br>
<a href="http://www.sequal.com/integraanalog10liter.htm" target="mainWindow">IntegraTen</a><br>
</span>


Each div is the first part of the nav bar (top layer). This you know, as you put the images there. But, you didn't give it a class name, this is what ties it to the style sheet. Then, close the entire submenu in a span tag, and either tie the span to a css class( like you did) or more simply put a style for a:link, etc. Since the sub menu is really nothing but a series of links. For the next button, start with another div, then another set of spans, so on so forth. I would go through both your style sheets and the nav bar and clean it up, you should only need 1-2 style sheet classes (maybe three if you add a mouseover effect for the div, as I did). If you have any qu
estions, just ask.