User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 401,497 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,208 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 905 | Replies: 1
Reply
Join Date: Feb 2008
Posts: 1
Reputation: joyeetadeb85 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
joyeetadeb85 joyeetadeb85 is offline Offline
Newbie Poster

Adding text boxes and buttons dynamically

  #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)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Posts: 10
Reputation: iamus is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
iamus iamus is offline Offline
Newbie Poster

Re: Adding text boxes and buttons dynamically

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JSP Forum

All times are GMT -4. The time now is 2:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC