Results 1 to 2 of 2

Thread: Image w/description tooltip problem

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

    Default Image w/description tooltip problem

    1) Script Title: Image w/ description tooltip

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

    3) Describe problem: I can get the script to work when I copy & paste the code to a new HTML page but I'm unable to get it to work, e.g. the popup image will not display when I add the script to an existing webpage.

    I've tried moving the tipDiv script around because maybe it was positioning but that doesn't work.

    I'm wondering if it's because I've got another rollover javascript also running for side navigation buttons? I've repositioned the script before & after the rollover script but no diff?

    My code can be viewed here: http://www.designbynature.co.nz/menstyles2.html

    Working script: http://www.designbynature.co.nz/mouseover_image.html

    Stumped, please help...


  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The problem seems to be due to the dual window.onload references you have on your page, causing a conflict.

    Find the line:

    Code:
    window.onload = initTip;
    and try changing that to:

    Code:
    if (window.addEventListener)
    window.addEventListener("load", initTip, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initTip)

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
  •