• 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

Use Select box (combobox) value on same page

 
Greenhorn
Posts: 7
Eclipse IDE C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Moose Saloon,

I'm trying to teach myself several new Java centered technologies (due to my new position). However, my co-workers are under deadline so I'm on my own to get up to speed. I've been creating a test application to become more familiar with JSP and Servlets. This is what brings me here.
I have a SelectBox (I've read that it is NOT to be called a combobox :), with students names. Below several Text boxes, etc is a table which displays the students class schedule (built when form is submitted). The table is being created through the use of JSP and session variables. What I'd like is to determine which student is currently selected in the SelectBox and use that value in my JSP code that builds the table. Ultimately what I want is that when the selected student changes the table is rebuilt, displaying the newly selected students schedule.

Code snippets below


//I do something along these lines
SchoolSchedule allSchedule = Session.getAttribute("schoolSchedule");
SchoolClass myclass = allSchedule.getClass(studentname); //This is currently hardcoded. Need a way to base this off the selectBoxes value

Then I loop through myclasses building the <TABLE> as needed



So...
1) How do I simply display selected value(ie 'newStudent2') on the screen? (I've tried 'request.getAttribute("studentCB")' but just get null)
2) How can I build a <TABLE> to be displayed within my 'onChange' function?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic