Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display same Data in JSP after reloading it

 
Dipti Lokhande
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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?
 
viju vi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic