Murray said:
Do a google for "overlib" - it may be just what you are looking for.
Hi to E Schultz,
Although I replied suggesting a title tag with
for a line break, I
actually use another script (not overlib). I am not sure who created it, but
I remember it as being public property - possibly from nl.internet.com or a
similar site.
This is it
//-------------------------------
// Capture events on mousemove
if (!document.all)
document.captureEvents(Event.mousemove)
//-------------------------------
// Write toolTip <div>
document.write('<div class="toolTipBox" id="toolTip"
style="z-index:1"></div>')
//-------------------------------
// Used in toolTip() and associated functions
var tt_theObj
var tt_theElemt
//-------------------------------
function toolTip(text,obj)
{
tt_theObj = obj
tt_theElemt = document.getElementById('toolTip')
tt_theElemt.style.display = 'inline'
var tipTxt = text.split("|")
for (var i = 0; i < tipTxt.length; i++)
{
tt_theElemt.appendChild(document.createTextNode(tipTxt
))
tt_theElemt.appendChild(document.createElement('br'))
}
tt_theObj.onmousemove = updatePos
window.onscroll = updatePos
}
//-------------------------------
function updatePos(m)
{
if (document.all)
{ var currX = event.clientX
var currY = event.clientY }
else
{ var currX = m.pageX
var currY = m.pageY }
if (document.body.scrollTop)
{ var iL = document.body.scrollLeft
var iV = document.body.scrollTop }
else
{ var iL = document.documentElement.scrollLeft
var iV = document.documentElement.scrollTop }
var nopix = (currX > screen.width/2 - 30)
? (currX - 10 - tt_theElemt.clientWidth)
: (currX + 10)
tt_theElemt.style.left = (document.all) ? (nopix + iL) +'px' : nopix +'px'
tt_theElemt.style.top = (document.all) ? (currY + iV) +'px' : currY +'px'
tt_theObj.onmouseout = hideTip
}
//-------------------------------
function hideTip()
{
tt_theElemt.style.display = "none"
while (tt_theElemt.lastChild)
tt_theElemt.removeChild(tt_theElemt.lastChild)
}
//-------------------------------
Put all this is a file named say scripts/tooltip.js and in your <head>, add
<script type="text/javascript" src="scripts/tooltip.js"></script>
To use, add this to any tag
onmouseover="toolTip('This is a link to my other website | which is still
under construction',this)">
Note the | in the tooltip text above. This causes a line break.