Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 09-25-2005, 09:41 PM
drh drh is offline
New Comer (less than 5 posts)
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default AnyLink Drop Down Menu js modification

AnyLink Drop Down Menu
http://www.dynamicdrive.com/dynamici...pmenuindex.htm
-------------

Thanks for the easy to configure drop down menu. Have a question somewhat related to this thread on making the top level link clickable when the page is viewed by browsers which don't fully support the script (in my case, NN 4.x and IE 5 Mac):
http://www.dynamicdrive.com/forums/s...Link+Drop+Menu

My problem was that after implementing the script on a site, I found that certain Mac browsers (as ref'd above) would not render the drop downs, which I knew would be the case. So, I created a link listings page for each of those links for which sub-menus were supposed to be created. Unfortunately, could not access those links listings pages by clicking on the top level link. Prior to my finding the solution identified in the thread above, I tried to debug the problem by modifying the clickreturnvalue function in the menu js as follows:

Changed:

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

to:

function clickreturnvalue(){
if (ie4||ns6) return true
else return true
}

Seems to work, as now all top level links are clickable and take the visitor to the link listings page for those particular top level links.

Would this be a better way to implement this (in terms of working cross browser/cross platform) or would it be better to take the onclick call out of the html? Right now I've tested this with all Mac browsers from NN4.x through current versions of Mozilla/Firefox, Opera, OmniWeb, Shiira, and Safari .... as well as the only Windows browser I have access to (IE 6) with no problems. My only concern is to ensure the script degrades as gracefully as possible.
Reply With Quote
  #2  
Old 09-25-2005, 11:37 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 18,999
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

That modification should be fine as long as your goal is to have all top level elements, when clicked, load the page that their href attribute is set to, in all browsers. Otherwise, a different way of discriminating among the various browsers is required. A note here, few of the stock DD scripts are written with a Mac in mind, or tested on one. One exception is the browser sniffer script whose contents may be instructive if you decide to be more discriminating among browsers/OS's.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #3  
Old 09-25-2005, 11:59 PM
drh drh is offline
New Comer (less than 5 posts)
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks John

After reading through all of the possibly related posts, I figured either way would work. In testing the js modification I made, it seemed it would work across the board. Just wanted a little reassurance. The site it will be used on is for our county's sheriff's office (up in nw PA .. Erie county). The sheriff is a friend of mine and I've been running his site for quite some time now. He continually wants additional content and things are to the point where I need to conserve screen space and the drop down menu will work well. Since it is a community service type site ... my goal is to exclude no one.

Thanks,

Dennis

Last edited by drh; 09-28-2005 at 11:57 AM.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:34 PM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.