Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jsp and html elements

 
Harry Pattern
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Harry Pattern
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64845
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Harry Pattern
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I exactly do a hidden iFrame ? Can you enlighten me on this ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic