Adding text boxes and buttons dynamically

Reply

Join Date: Feb 2008
Posts: 1
Reputation: joyeetadeb85 is an unknown quantity at this point 
Solved Threads: 0
joyeetadeb85 joyeetadeb85 is offline Offline
Newbie Poster

Adding text boxes and buttons dynamically

 
0
  #1
Feb 6th, 2008
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)
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 11
Reputation: iamus is an unknown quantity at this point 
Solved Threads: 0
iamus iamus is offline Offline
Newbie Poster

Re: Adding text boxes and buttons dynamically

 
0
  #2
Feb 6th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JSP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC