Results 1 to 2 of 2

Thread: Fixed tool tip positioning

  1. #1
    Join Date
    Nov 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Fixed tool tip positioning

    1) Script Title: Fixed Tool Tip

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

    3) Describe problem: Positioning immediately to the right or left of anchor


    I am using the fixed tool tip in an iframe. I set it up easily enough and all is working well except that I want to position the tooltip immediately to the right or left of the anchor.

    If I play around with the horizontal offset I can move it to the left or right of the anchor but no matter what values I insert for the vertical_offset the position of the tip never moves up or down. I need to move it down to get it immediately to the right of my anchor. If I can't get it to move down then the tip gets hidden behind my main frame.

    Here are the values I am playing with
    Code:
    var vertical_offset="0px"      //horizontal offset of tooltip from anchor link
    var horizontal_offset="-3px"        //horizontal offset of tooltip from anchor link
    My main page is here: http://football24.myfantasyleague.com/2006/home/19610

    The iframe with the tooltips is the long table with the scores and the tooltips are located when hovering over the scores.

    If you go to my main page you will see why I need to move the tip down.

    Thanks for any help.

  2. #2
    Join Date
    Nov 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Never mind I got this worked out by ammending this function.

    Code:
    function clearbrowseredge(obj, whichedge){
    var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
    if (whichedge=="rightedge"){
    var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth+20
    }
    else{
    var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight-40
    }
    return edgeoffset
    }

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
  •