Layer Genie Support Product Page

This topic is locked
This topic was archived

Javascript error...

Reported 23 May 2003 13:25:57
1
has this problem
23 May 2003 13:25:57 Jeffrey Bowman posted:
Hello,

I'm attempting my first Layer Genie project. It's a very simple named anchor with a single layer.

I'm getting a javascript error "left is null or not an object" during the onMouseOver.

You can find the attempt at www.shadescapes.com/menubar.asp

The "View" item is the one tripping the error.

Thanks in advance,

Jeffrey

Replies

Replied 23 May 2003 13:38:26
23 May 2003 13:38:26 Marja Ribbers-de Vroed replied:
Some quotes from your page:

<pre id=code><font face=courier size=2 id=code>&lt;DIV id=view style="Z-INDEX: 1; LEFT: 200px; VISIBILITY: hidden; WIDTH: 68px; POSITION: absolute; TOP: 202px; HEIGHT: 103px"&gt;
</font id=code></pre id=code>
and
<pre id=code><font face=courier size=2 id=code>
&lt;A onmouseover="dmxFLG1('view',0,1,'',2,'view',2,NaN,NaN,0,0,0,0,0,0,0,0,0,0)" href="www.shadescapes.com/menubar.asp#" name=view&gt;</font id=code></pre id=code>

The DIV has the ID 'view', while the text link (to be used as an anchor) is named 'view' as well.
So now there are 2 elements on the page with the same name/id and Layer Genie doesn't know which one to handle.
Always make sure element ID's and names are unique on a page.

Furthermore, you've specified an anchor for the menu layer, but you haven't specified a valid left/top offset (these are the 'NaN' arguments in your function call.
Go back to the Layer Genie dialog and specify a valid numeric offset for the anchor.

Hope this helps.

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 23 May 2003 13:44:10
23 May 2003 13:44:10 Jeffrey Bowman replied:
That took care of it !

Thanks Marja !
Replied 23 May 2003 13:52:59
23 May 2003 13:52:59 Marja Ribbers-de Vroed replied:
You're very welcome!

One more thing: remove the 'height' declaration from your DIV.

It's not needed because the DIV will automatically collapse to fit its content.
But more important: it's a potential problem in some browsers (e.g. IE on Mac).


--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/

Reply to this topic