Advanced Search

Results 1 to 5 of 5

Thread: Image w/ description tooltip

  1. #1
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Image w/ description tooltip

    I've used the search function but I've been unable to find a solution .

    Image w/ description tooltip

    http://www.dynamicdrive.com/dynamici...agetooltip.htm

    The script works perfectly for me , mouse over and picture / description appear ( position is currently set just below link )

    var tipWidth= 160;
    var offX= -80;
    var offY= 40;

    when the page is at the top , however .........

    when the page is scrolled down , my tip box moves with it instead of always being below the link it then appear either above or if scrolled half way , right over the connecting link .

    thanks in advance for any help .
    Last edited by ipcress; 04-11-2006 at 08:42 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,690
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    Most likely, you have a DOCTYPE on your page, generally that is a good thing but, this script was written before the wide use of DOCTYPEs and so must be upgraded to work with them.

    With many of the scripts of this type all that is required is to change all instances of:

    Code:
    document.body
    to:

    Code:
    document.documentElement
    But, in some older browsers, this will make problems so what can be done is to change all document.body references to:

    Code:
    iecompattest()
    and put this function in the script block before any occurrences of iecompattest():

    Code:
    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }
    Sometimes references to position and/or styled (not attributed) dimensions in the script must be made to use pixels but, this does not appear to be a problem in this script.
    - John
    ________________________

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

  3. #3
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Many thanks for your help and your time .

    I'll add in the new script this week-end to see if it works .


  4. #4
    Join Date
    Apr 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ah hell I could n't wait ...... works like a dream

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

    Default

    I registered just so I could say THANK YOU to John for posting the solution to this issue! It was driving me absolutely crazy, now it works perfectly. Thank you so much!!

    Happy New Year!

    Jess

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
  •