Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Example

<script type="text/Javascript">
ttb = document.getElementById("toolTipBox");

function tooltip(message,ext){
// Displays the tooltip at the correct coordinates
// @param Type Description
// message String The text to be displayed.
// ext Object The object containing the data.

ttb.innerHTML = message;
coor = new function(){
this.left = 0;
this.leftNode = ext;
this.top = 0;
this.topNode = ext;
}

while(coor.leftNode.offsetParent){
coor.left += coor.leftNode.offsetLeft;
coor.leftNode = coor.leftNode.offsetParent;
}

while(coor.topNode.offsetParent){
coor.top += coor.topNode.offsetTop;
coor.topNode = coor.topNode.offsetParent;
}

ttb.style.display = "block";
ttb.style.left = (coor.left+ext.offsetWidth)+"px";
ttb.style.top = coor.top+"px";
}

function untooltip(){
// Hides the tooltip.
ttb.style.display = "none";
}
</script>



Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
lol took you long enough to post it ¬¬ lol

sweet as i said when you made it :P

ScottCool

ScottCool Avatar

****
Senior Member

269


November 2005
Very nice,I am using this but it wont work if you have more than one on a page,how can I fix this?

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
scottcool said:
Very nice,I am using this but it wont work if you have more than one on a page,how can I fix this?


It works fine in the example with more than one. View the source of it if you need help understanding how.

ScottCool

ScottCool Avatar

****
Senior Member

269


November 2005
No,I mean not together apart.I'm using it on a forum and I want one in the header and one in the footer.but the new one only opens the other.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Any chance you can link me and show me what you're referring to?

ScottCool

ScottCool Avatar

****
Senior Member

269


November 2005
yea,place your mouse on the one in the footer.I have tryed just adding the part that adds the text and the whole code over again.
nflsportsboard.proboards81.com/index.cgi

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
<script type="text/Javascript">
ttb = document.getElementById("toolTipBox");

function tooltip(message,ext){
// Displays the tooltip at the correct coordinates
// @param Type Description
// message String The text to be displayed.
// ext Object The object containing the data.

ttb.innerHTML = message;
coor = new function(){
this.left = 0;
this.leftNode = ext;
this.top = 0;
this.topNode = ext;
}

while(coor.leftNode.offsetParent){
coor.left += coor.leftNode.offsetLeft;
coor.leftNode = coor.leftNode.offsetParent;
}

while(coor.topNode.offsetParent){
coor.top += coor.topNode.offsetTop;
coor.topNode = coor.topNode.offsetParent;
}

ttb.style.display = "block";
ttb.style.left = (coor.left+ext.offsetWidth)+"px";
ttb.style.top = coor.top+"px";
}

function untooltip(){
// Hides the tooltip.
ttb.style.display = "none";
}

</script>


Remove that form your global header. You only need that snippet once. See, this is meant to be a coder's resource, not a ProBoards code. :P That's the main problem.

newBookmarkLockedFalling