Advanced Search

Results 1 to 2 of 2

Thread: Image Description with Tooltip

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

    Default IMG Description w/ tooltip doesn't display whole tooltip.

    I'm try to use the Image w/ Description Tooltip script, and it's all fine and good except for one thing. I have my webpage in frames, with links on the left frame for navigation. It's there that I want the tooltips, but they always open on the left side of the cursor, which means, inconveniently, half of the tooltip is on the screen. I think the reason they do this is because they are trying to fit within the window or frame that they are in, but it's just kinda messing it up. Is there a way to force it to open on the right side of the cursor?

    I think it's somewhere's in here:

    var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth:

    tooltip.offsetWidth;
    var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight:

    tooltip.offsetHeight;
    // document area in view (subtract scrollbar width for ns)
    var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset:

    document.body.clientWidth+document.body.scrollLeft;
    var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset:

    document.body.clientHeight+document.body.scrollTop;
    // check mouse position against tip and window dimensions
    // and position the tooltip
    if ((mouseX+offX+tpWd)>winWd)
    tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
    else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
    if ((mouseY+offY+tpHt)>winHt)
    tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
    else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
    if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
    }
    Anyway, I'll state the problem again in case it wasn't real clear before.
    I have the image w/ description tooltip script running in my navigation frame, which is a bunch of images the same width as the navigation frame that work as buttons, basically. What the tooltips do though, is always open on the left side of my cursor, because the right border or edge of the frame is not large enough to fit the tooltip within. This is bad, because my navigation frame is on the left side of the page, so I can't see the whole tooltips.

    Is there away to force the tooltip to open on the right side of the cursor, even if it has to go outside the frame or window?
    Last edited by pxc; 09-16-2005 at 03:35 PM.

  2. #2
    Join Date
    Sep 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ... Well, actually... it might not be in there at all, because that part I quoted is just the part that makes it change which side it's on. It might just not display the alt outside of it's frame. Any help? Any help at all?

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
  •