aspose file tools*
The moose likes JSP and the fly likes Jsp and html elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Jsp and html elements" Watch "Jsp and html elements" New topic
Author

Jsp and html elements

Harry Pattern
Greenhorn

Joined: Nov 27, 2002
Posts: 23
hi,
kindly help me on this..
I do have a combobox with 5 items. and 4 textbox. If the user select an item in the combobox the textboxes should be update based on the values stored in the database. Jsp should be the one that will query the database and bring the values to the textboxes. I wonder what would be the approach that you can suggest on this.
If you do have this kind of experience how did you resolved it ?
Thanks
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Harry,
This is the simplest examplei can give,
whatever name you give to follwing jsp should be reflected in action of form

Cheers
Praful
[ November 19, 2003: Message edited by: Praful Thakare ]
[ November 19, 2003: Message edited by: Praful Thakare ]
[ November 19, 2003: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Harry Pattern
Greenhorn

Joined: Nov 27, 2002
Posts: 23
Hi,
This is a brilliant solution. But is there a way in which I don't have to submit the form . Cause I need to keep track of all the data in the form .The output is almost similar below.
ITEMNAME PRICE
item1 100
item2 200
item3 300
I Need to select the item name which is in the combobox. And this should be for multiple items . If I select an item name then query the database then get the corresponding price.
How can we do this ?
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
if you want to update some data on a page without submitting a form then you must use javascript. you must preload all of the corresponding values into some javascript datastructure and then create some javascript so that when they change the option it updates the displayed value.


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Then there's also the technique of making the request into a hidden iframe so that the page being viewed does not appear to refresh. The request also doesn't necessarilly have to be the result of a form submission; a simple href will do if there are only simple request parameters (or none).
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Harry Pattern
Greenhorn

Joined: Nov 27, 2002
Posts: 23
Hi,
How can I exactly do a hidden iFrame ? Can you enlighten me on this ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jsp and html elements