This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Joe Ess
  • salvin francis
  • fred rosenberger

Use Select box (combobox) value on same page

Posts: 7
Eclipse IDE C++
  • Mark post as helpful
  • send pies
  • 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

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?
knowledge is the difference between drudgery and strategic action -- tiny ad
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!