File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes dymamic generate text input field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "dymamic generate text input field" Watch "dymamic generate text input field" New topic

dymamic generate text input field

Kan Qiu

Joined: Nov 26, 2002
Posts: 16
How can I use Javascript to generate text input field base on user selection.
<select name="box">
<option value="1"> add 1 box </option>
<option value="2"> add 2 box </option>
if add 1 box is selected, I would like to have one more box generated after this dropdown list. if add 2 box is selected, I would have 2 box generated instead of just 1.
please help.

Kan Qiu<p>SCJP<br />SCWCD
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
It is a rather easy code:
I agree. Here's the link:
subject: dymamic generate text input field