View Full Version : scrollTop not working on IE

05-07-2007, 10:18 AM
Im using javscript to show a simple pop up where a user clicks on a page.
the code looks something like this:

var ie=document.all;
var nn6=document.getElementById&&!document.all;

function showBx(e){
bx = document.getElementById('tipbox').style;
ty = document.body.scrollTop;
bx.left = nn6 ? e.clientX : event.clientX;
bx.top = nn6 ? ty + e.clientY : ty + event.clientY;
return false;

I however find out that document.body.scrollTop doesnt work on IE (works on Opera). Any suggestions/recommendations?

Mr J
05-07-2007, 01:49 PM
What version of IE

You could try