Left offset

M

M.L.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top