Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Left offset

Reply
Thread Tools

Left offset

 
 
M.L.
Guest
Posts: n/a
 
      12-03-2004
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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing offset-aware and offset-naive datetimes? Roy Smith Python 4 01-27-2013 03:17 PM
Trouble finding left/top offset position of a DIV when parent DIVhas a border Stevo Javascript 10 03-27-2008 04:43 PM
Getting statically positioned element window offset positions (left, top)? Pieter Van Waeyenberge Javascript 1 02-09-2004 01:58 PM
HOW TO: Find the Top & Left window offset of an embed'ed [Flash] object. gsb Javascript 3 11-24-2003 10:54 AM
Translated Offset to Source Offset Lance Riedel XML 2 10-15-2003 03:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57