Richard,
Here's a form problem you may have seen. For a simple form defined
in a layer (see code below), Netscape can access the text field's
value fine but IE (I'm on 5.5) returns the blank string. Does
anyone know what's going on?
DynAPI.onLoad=function() {
layer1 = new DynLayer();
DynAPI.document.addChild(layer1);
layer1.setHTML('\
<form name="testForm">\
<input type="text" name="testText" size="5" value="Test">\
</form>'
);
alert(layer1.doc.forms[0][0].value);
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard
Bennett
Sent: Thursday, June 14, 2001 10:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] proper way to access forms in a DynLayer
> You need to assign an ID to all elements you wish to access. Then...
I have had some errors occurring by using ID="blah" and NAME="blah" in the
wrong places.
In a div its ID for all browsers.
In a form it's ID for v5+ browsers, and also NAME for all browsers.
An image seems to be NAME for NS6, and ID in the rest.
Does anyone know of a matrix showing what to use cross-browser?
Richard.
----- Original Message -----
From: "Digital Strider" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 14 June, 2001 18:57
Subject: RE: [Dynapi-Help] proper way to access forms in a DynLayer
> You need to assign an ID to all elements you wish to access. Then...
>
> layer1.doc.myform
>
> or
>
> layer1.doc[myform]
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jonah
> Sent: Thursday, June 14, 2001 9:44 AM
> To: Dynapi-Help
> Subject: [Dynapi-Help] proper way to access forms in a DynLayer
>
>
> Say I have created two DynLayers, layer1 and layer2.
> The HTML in layer1 has a form called "layer1Form".
> The HTML in layer2 has a form called "layer2Form".
> How do I access those forms later?
> I tried "layer1.forms[0].layer1Form", which does not work.
> Does anyone know the correct way?
>
> Thanks,
> Jonah
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help