The way to print to a page is the document.write() method.
But you cannot document.write() to a page once it is loaded without overwriting the page. So a target element to which you can either add or modify one of its text nodes, or modify its innerHTML property would be a good idea.
If this is just for troubleshooting purposes, innerHTML will do just fine - Put a division on your page in the body area:
HTML Code:
<div id="mytestdiv"></div>
Then in your script code:
Code:
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
document.getElementById('mytestdiv').innerHTML = 'The value of the tipobj offsetHeight is: ' + tipobj.offsetHeight;
}
Bookmarks