Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.onscroll problem with the mouse wheel!! help!

Status
Not open for further replies.

YvonneTsang

Programmer
Sep 28, 2001
37
CA
I am having some problems with the wheel mouse and my document.onscroll. I have an image that I want to keep on the middle of the page(an arrow and some stuff). I use the document onscroll to move the image and the appropriate onclick event for it. The problem that occurs for me now is that when I have drop down boxes, they become distorted when I use the wheel mouse. it works fine if you use the scroll bar which is what has me so confused. Can someone out there help me??

if (document.body.offsetWidth>hud_center+ 75 )
hud_x = document.body.scrollLeft + (document.body.offsetWidth+hud_center)/2 - hud_width + 16;
else
hud_x = document.body.scrollLeft + document.body.offsetWidth - hud_width - 25;
//hud_y = document.body.offsetHeight + document.body.scrollTop - hud_height - 40;
hud_y = document.body.offsetHeight/2 + document.body.scrollTop + 40;
hud.style.left = hud_x;
hud.style.top = hud_y;
 
actually for this it would be easier for us to help you debug if you could post your example on a url or something.

Gary Haran
==========================
 
hmm I can't really post it anywhere.. I know it is only a IE 6 error(tried it on IE5.5 and it worked fine)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top