• 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

Display same Data in JSP after reloading it

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP is as follows :

Marks Details

Student Type : cboStudentType (combo box)
Student Name : cboStudentName (combo box)
Marks 1 : txtMar1 (text field)
Marks 2 : txtMar2 (text field)
Marks 3 : txtMar3 (text field)
Total : txtTotal(text field)

In above form , depending on selected student type, stident names will be fetched from the data table. After entering marks1, marks2 and marks3, Total should be calculated. Whenever total will be displayed, selected student type, student name and all marks should be restored back in the page.
Please do tell me how to achieve this?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi you can try doing this, this is one option give a onchange event to your combobox so that when a studenttype is selected trigger a javascript which send a request back to same page send the studenttype and while loading the page fetch the studenttype and send a database call to get the list of students data. and once this is done load the student names to the studentname combobox. similarly on selection of a particular student name send request to the same page by forwarding the type and name with it. and make a cal to fetch the marks, if no entry found load the input filed to enter and submit or else display the entered fields

your jsp will have following

thats all
[ December 06, 2007: Message edited by: Ben Souther ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic