HighDots Forums  

Left offset

Javascript JavaScript language (comp.lang.javascript)


Discuss Left offset in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
M.L.
 
Posts: n/a

Default Left offset - 12-03-2004 , 07:59 AM






Hi NG

I have created a fairly simple dynamic drop-down menu, which works by
hiding/showing DIV's (in another frame, though) on mouseover. I have
built the menu so that it can cope with left/right scrolling, i.e. the
DIV's always turn up in the same place, relative to the rest of the
page content. I am calculating/measuring the left offset in order to
this. So far, so good. My question is now this:

Sometimes (rarely, actually), I get an "Object does not support this
property..."-error on this code line, in which I determine the amount
of left/right scroll:

var ScrollLeftOffset = parent.main.document.body.scrollLeft;

What is wrong, and why doesen't the error occur everytime I use the
menu, but only perhaps 1 of every 50 times? Is there another, more
stable, way of determining the left offset?

Hope somone can help me out.

Thanks!

regards,

M.L.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.