[Javascript] Change a form object

Chris Basken chriz at basken.com
Wed May 2 12:50:12 CDT 2001


there's no simple way to do this.  you can show/hide form elements inside
absolute-blocks (divs, layers, etc), but in NS, each layer is its own
document object, which will require its own form.  you can consolidate
multiple forms on a single page into one before submitting (using a "master"
form with hidden fields), but the process is hardly simple.

if you don't care about NS, IE might let you dynamically change a form
element's type property, but i haven't experimented with that.

>
>     Rather than physically changing a form element -- which I believe is
> impossible -- why not just have logic that displays/hides form elements as
> you need them?
>
> ----- Original Message -----
> From: "Reuben D Budiardja" <reubendb at goshen.edu>
> To: <javascript at LaTech.edu>
> Sent: Wednesday, May 02, 2001 10:47 AM
> Subject: [Javascript] Change a form object
>
>
>
> Hello,
> Is there any way I can change a form object in javascript? What I mean,
> if I have a
>
> <INPUT TYPE="TEXTBOX">
>
> can I change it to
>
> <SELECT NAME="select_something"><OPTION NAME="bla"><OPTION
> NAME="bla2"></SELECT>
>
> by using javascript, say if a user click/unclick a checkbox?
>
> Thanks for any suggestion.
> Reuben D. Budiardja
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>





More information about the Javascript mailing list