File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes generating textfields when i click a button Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "generating textfields when i click a button " Watch "generating textfields when i click a button " New topic
Author

generating textfields when i click a button

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
hi
There is a form which contains a button.whenever i click the button i need to generate text fields .then i enter some value in the textfield.when i click button the entered value in text value is disappering ;
i have seen this link but in that example with generation of checkboxed itself they r incrementing values but i dont want like that .i will enter some text and after that when i click button value entered in the first textfield is disapppering.
http://www.coderanch.com/t/113635/HTML-JavaScript/generate-checkboxes-increasing-values-clicking
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50677

What this has to do with JSP is beyond me. Moving to the HTML/Javascript forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
It is rewriting the text fields each time, basically I would say store the values in an array and repopulate the fields when it adds a new field...
There is probably a better way to add check boxes with dom, you may want to search the forum for adding table rows....That method, you would not loose the information in the text box.
Eric
 
IntelliJ Java IDE
 
subject: generating textfields when i click a button
 
Threads others viewed
OnClick - trigger Reset button?
Browse Button validation
Can session variables be stored in HTML
getElementById
is it possible we can detect button name which have clicked ?
IntelliJ Java IDE