Click to See Complete Forum and Search --> : document.body.scrollLeft not work in IE6


iamtherookie
01-16-2003, 04:28 PM
I am using JS code on an ASP page that tells the client exactly where the cursor currently is (document.body.scrollLeft+event.x and document.body.scrollTop+event.y) so that a popup menu can be launched at this point when the user clicks. Using this code the popup menu is perfectly placed in IE5, but when using IE6 both document.body.scrollLeft and document.body.scrollTop are not working properly and return no value so that when a user scrolls down the page and attempts to open the popup menu it is placed too far up the page (same thing when the user scrolls right, it is placed too far to the left). Is there new code for this or am I overlooking something?
Any ideas/help/suggestions would be greatly appreciated.
Thanks!

swon
01-16-2003, 04:34 PM
Use scrollTo(x,0);

iamtherookie
01-16-2003, 04:54 PM
Not a bad idea, tried it out, but scrollTo(x,y) scrolls to the point on the page. What I need is that exact point first, and scrollTop and scrollLeft are not returning any values after the client scrolls on the page, at least not in IE6....