[Javascript] Netscape object model : forms in div/layer

Rodney Myers rmyers at i-way.co.uk
Tue Apr 24 03:14:49 CDT 2001


The page in question had one layer inside another and the document model
recurses so that each layer has a document and each document has a
layers object.

Here is the HTML:


<div ID="LayoutLYR">
<layer ID="LayoutLYR" TOP=0 LEFT=0 VISIBILITY=INHERIT WIDTH=715
HEIGHT=665 Z-INDEX=1>
<div ID="Text1LYR" CLASS="TextObject">
<layer ID="Text1LYR" VISIBILITY=INHERIT TOP=68 LEFT=154 WIDTH=561
HEIGHT=495 Z-INDEX=1>
...
<form onSubmit="buy(this);return(false);" name="">


And the form show can be addressed in Netscape as (wait for it):

var
form=window.document.layers["LayoutLYR"].document.layers["Text1LYR"].document.forms[0];

The same form in IE:
var form=window.document.forms[0];

Rodney


Rodney Myers wrote:
> 
> Chris,
> 
> Thanks for the reply.
> It has to be something like that, but it did not work just like that.
> I would really still like to get this sorted for other purposes.
> 


-- 
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/

Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions




More information about the Javascript mailing list