window.pageXOffset and window.pageYOffset don't work in Internet explorer 7.0 ?
Posted on 2006-06-19
I'm trying to call window.pageXOffset and window.pageYOffset in I.E. 7.0 but it doesn't work. It gives me "undefined" value. I tested the same code in Mozilla 1.5.04 and it works fine.
I wonder if I did something wrong or this is how the browser works. If this is how I.E 7.0 responds to it, I'm looking for alternatives to get X and Y position.
This is what I have:
var xVal = window.pageXOffset;
var yVal = window.pageYOffset;
alert(" --> xVal: " + xVal + " --> yVal: " + yVal);
~ Thanks in advance for the help ~