• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jsp and html elements

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 645
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How can I exactly do a hidden iFrame ? Can you enlighten me on this ...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic