[thelist] form elements on a div plus javascript

Aaron Boodman aaron at youngpup.net
Tue Sep 3 08:40:01 CDT 2002


> if the form is on a div, how do you pick the form element values in
> javascript?

It doesn't make an difference *unless* you are in navigator 4.x and the div
is absolutely-positioned with CSS. In that case, the div magically becomes a
proprietary navigator 4 construct called a "layer". In that case, the layer
becomes it's own document.

If you had:

<div id="myDiv" style="position:absolute;">
    <form name="myForm">
        <input type="text" name="myTextbox">
    </form>
</div>

In navigator 4.x only, to get the value of myTextbox, you'd need:

window.document.layers.myDiv.document.myForm.myTextbox.value;

g'luck

--
Aaron Boodman
aaron | www @ youngpup.net


----- Original Message -----
From: "Stevenson Ngila" <Stevenson at epr.footman-walker.com>
To: "Thelist at Lists. Evolt. Org" <thelist at lists.evolt.org>
Sent: Tuesday, September 03, 2002 5:25 AM
Subject: [thelist] form elements on a div plus javascript


> when a form is not build on a div, the form elements values can be picked
in
> javascript using:
> document.formname.formelement.value.
>
> if the form is on a div, how do you pick the form element values in
> javascript?
>
> Thanks,
> Stevenson Ngila
> Footman-Walker Associates Ltd
> http://www.footman-walker.co.uk
>
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list