Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Anylink Drop Down Menu problem with Safari 2.0

  1. #1
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Anylink Drop Down Menu problem with Safari 2.0

    1) Script Title: Anylink Drop Down Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem: In Safari 2. the drop down menu disappears when you place your mouse on it.

    I am using the onclick version of the menu. (<a href="default.html" onclick="return dropdownmenu(this, event, menu1, '200px')" onmouseout="delayhidemenu()">) I have the drop down menus in a separate .js file.

    Except for Safari 2.0, it works correctly in all other browsers (to my knowledge), including Safari 1 and the new Safari 3 for windows.

    Can anyone help? I like the onclick feature, as opposed to an onmouseover menu.

    Thank you.
    Last edited by Katyw; 10-13-2007 at 05:34 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I kind of doubt that there will be too many folks around here that can help out with this script that also have Safari 2.0 to test on.

    I don't even have a Mac, so I cannot say with any certainty that my suggestions will help. Two things jump out at me though. Make sure this:

    Code:
    var hidemenu_onclick="yes" //hide menu when user clicks within menu?
    is set to "no", and try increasing this:

    Code:
    var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
    to - say, 350.

    I have another hunch if that doesn't work out. To test that theory, make up a blank page and put this:

    Code:
    <script type="text/javascript">
    alert(document.getElementById&&!document.all);
    </script>
    in the body. See what it alerts in Safari 2.0 and get back to me.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    John, that alerts "true".

    I just tested in Safari 2.

    It sorta works, but it is strange.

    If I really try to click it, it will work.

    But if I just click it randomly, it sorta flickers then goes away after a split second.

    Also, if it does work, it goes away onmouseout (original texT), and keeps the menu active only for the first two menu items; the third menu item doesn't keep the menu active-- it closes.

    It's a bit hard to explain the behaviour, and certainly not stable.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    >I don't even have a Mac, so I cannot say with any certainty that my suggestions will help.

    I don't own a Mac either, so I was only recently made aware of the problem. The Mac server that hosts the site is not new and the latest version of Safari that I can run is 1.3.2. Testing using Safari 2 is a problem for me also.

    I am the webmaster for an informational site for a state agency that needs to be accessible to anyone, so I need to accomodate Safari 2. However, I really like the onclick function of the Anylink Drop Down menu.

    Anylink drop down with CSS works in Safari 2, so one option I have is to switch to that menu. But I do like the onclick feature and I like having the menu is a .js file so I can easily change it for my 100+ page site.

    Is it possible to include Safari 2 in the if statements (if (ie4||ns6)) and direct Safari 2 users to the alternate menu page? I don't know how to write that statement. I have limited coding abilities.

    I'd appreciate any help you can give me.

    Thanks.

    Katy
    www.drugfreeinfo.org

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    needs to be accessible to anyone
    Then a javascript menu with javascript code that contains the actual links is not for you. Any browser can have javascript disabled, some don't even have it as an option, there's just no javascript. For those users, there would be no menu.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, John.

    You make a valid point.

    I should clarify what I meant to say - we are concerned about those folks using old or donated computers at community centers, small libraries, etc., who may be using an old browser, or who can't change the browser. We are not particularly concerned about those who can turn their javascript off and on.

    Is it possible to send Safari 2.0 users to the alternate menu pages?

    Thanks.

    Katy

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Many users cannot turn javascript on or off. In some browsers, for certain handicaps, javascript just isn't available. For other users, javascript is turned off, but they either don't know how to or don't have permission/access to turn it on.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm.

    A pure CSS menu would have accessibility issues also.

    Is there an option for a DD menu that wouldn't exclude anybody? Or will I always exclude "somebody" if I use anything other than straight links?

    I appreciate your help.

    Katy

  9. #9
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I commented out the .js file in my code, and the Anylink Drop Down Menu still works. It takes the user to the alternate menu pages. I originally used this great DD menu because it incorporates that option. Now I'm confused.

    I've convinced myself that there has to be a work around for Sarafi 2.0, but I'm just not smart enough to figure it out.

    Could there be a work around or should I give it up?

    Katy

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The alternate menu pages only work if they exist and are kept current, but yes that is an excellent way to use the anylink menu accessibly.

    I know how to exclude Safari, but not specific version numbers. If you have a test, for example I will use the test for Safari that I know, the one that doesn't single out any specific version:

    Code:
    if(/Apple/.test(navigator.vendor))
    You could do something really straightforward like return true from the drop down:

    Code:
    function dropdownmenu(obj, e, menucontents, menuwidth){
    if(/Apple/.test(navigator.vendor))
    return true;
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
    clearhidemenu()
    dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
    populatemenu(menucontents)
    
    if (ie4||ns6){
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
    }
    
    return clickreturnvalue()
    }
    It would be a good idea to do the same here:

    Code:
    function delayhidemenu(){
    if(/Apple/.test(navigator.vendor))
    return true;
    if (ie4||ns6)
    delayhide=setTimeout("hidemenu()",disappeardelay)
    }
    Any browser excluded in such a manner from those functions will work as though the script isn't on or liked to the page. That's only when using the onclick method of dropping down. If you are using the default hover method, you would need to add it here as well:

    Code:
    function clickreturnvalue(){
    if(/Apple/.test(navigator.vendor))
    return true;
    if (ie4||ns6) return false
    else return true
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •