View Full Version : Fixed tool tip positioning

09-11-2006, 09:40 PM
1) Script Title: Fixed Tool Tip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/fixedtooltip.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

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.

09-11-2006, 10:30 PM
Never mind I got this worked out by ammending this function.

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
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
return edgeoffset