Hello,
I have created a javascript that onClick sets a display style of a div tag either show or hide a sub menu....
Is there a way that will allow the submenu to stay 'show' or hide based on the current page??
Kendall
Display a submenu of a menu rollover based on page
Moderator: General Moderators
- Vincent Puglia
- Forum Commoner
- Posts: 67
- Joined: Thu Sep 04, 2003 4:20 pm
- Location: where the World once stood
Hi kendall,
In general, the answer is yes, but without seeing your code......?????
One possible solution: use a setTimeout() and check the current document.location against what you want.
if (document.location == "http://members.aol.com/grassblad")
...code to display div...
Vinny
In general, the answer is yes, but without seeing your code......?????
One possible solution: use a setTimeout() and check the current document.location against what you want.
if (document.location == "http://members.aol.com/grassblad")
...code to display div...
Vinny
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
Display a submenu of a menu rollover based on page
Hello,
Well i created a solution where by i placed a
on each page
and did a
see... i was trying to do it that way originially but the thing is the i wanted the menu displayed if the current page was in 'group' thus i need to identify the group. having to do a location would mean i then have to trace it through the group. Im not a javascript person....so i took the easy way out
heres what i did....
embarassing...i know i know...but it works
Kendall
Well i created a solution where by i placed a
Code: Select all
var page = sub menu idand did a
Code: Select all
onLoad ToggleMenu(page);heres what i did....
Code: Select all
function toggleMenu(obj){
if (parseInt(navigator.appVersion) >= 5 || navigator.appVersion.indexOfї"MSIE 5"] != -1){
if(obj.style.display !='none')
obj.style.display = 'none';
else obj.style.display = '';
}
}
var page = 'the menu';
<body onLoad = toggleMenu(page);>Kendall
- Vincent Puglia
- Forum Commoner
- Posts: 67
- Joined: Thu Sep 04, 2003 4:20 pm
- Location: where the World once stood