| | |
Adding text boxes and buttons dynamically
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 1
Reputation:
Solved Threads: 0
Hello everyone...i am new to this community, and also a first time user of jsp...
I have to complete, and make some modifications in a particular project (made by someone else), which has been made in JSP.
I have to add a textbox, followed by a button (with the label Add New).
When i click on the above button, a new textbox and button will open (This is very similar to what we use in yahoomail/gmail to add more attachments). After adding as many text boxes as i want, and on pressing the submit button in the form, data in all the textboxes should be added to the database.
Can anyone plz guide me about how i should go about doing this??
PS: i'd be really greatful if someone can tell me how to accomplish the required task using jsp, and servlets only (and WITHOUT USING JSTL/custom tag library/beans, since the major part of the project has been developed using servlets. Beans/jstl/custom tags have not been used anywhere in the project)
I have to complete, and make some modifications in a particular project (made by someone else), which has been made in JSP.
I have to add a textbox, followed by a button (with the label Add New).
When i click on the above button, a new textbox and button will open (This is very similar to what we use in yahoomail/gmail to add more attachments). After adding as many text boxes as i want, and on pressing the submit button in the form, data in all the textboxes should be added to the database.
Can anyone plz guide me about how i should go about doing this??
PS: i'd be really greatful if someone can tell me how to accomplish the required task using jsp, and servlets only (and WITHOUT USING JSTL/custom tag library/beans, since the major part of the project has been developed using servlets. Beans/jstl/custom tags have not been used anywhere in the project)
•
•
Join Date: Oct 2006
Posts: 11
Reputation:
Solved Threads: 0
you can go many places here, if you want to use servlet, first of all you can for example create a session scoped object like an arraylist where you add data to it everytime and then render it upon response. You could do the same with a request scop object using the setParameter and getParamter
I do think you should use ajax however, it's much more effecient and would be faster since it's client side and you'd give the server some rest.
search for:
XMLHttpRequest
I do think you should use ajax however, it's much more effecient and would be faster since it's client side and you'd give the server some rest.
search for:
XMLHttpRequest
![]() |
Other Threads in the JSP Forum
- Previous Thread: Rounding numbers
- Next Thread: Mathematical operators
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





