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 To add a control in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "To add a control in JSP" Watch "To add a control in JSP" New topic
Author

To add a control in JSP

Abin Thomas
Greenhorn

Joined: Dec 21, 2006
Posts: 3
Heelo, is it possible to add a control dynamically in a jsp page.
exampl
i uses a text box and if i enter a string another text box has to be added near to the first one else a combo box has to be added. is it possible.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8208
    
  71

Can be done using Javascript


[My Blog] [JavaRanch Journal]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56528
    
  14

The fact that you are in a JSP is moot as all this occurs on the client.

You can either create and remove the elements under Javascript control as appropriate by using DOM manipulation, or if you know what you need in advance, create all of the elements up front and hide and show them as approrpiate.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To add a control in JSP
 
Similar Threads
Is it possible to pass a value from JSP to Javascript
cloning labels
Dynamic adding
JSP from Java Object
How do i create dynamic input fields after click a button?