The Artima Developer Community
Sponsored Link

Java Answers Forum
Reading from a db

3 replies on 1 page. Most recent reply: May 10, 2004 3:46 AM by Sushil Srivastava

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Jacodia Swartz

Posts: 5
Nickname: cody
Registered: Apr, 2004

Reading from a db Posted: Apr 27, 2004 8:12 AM
Reply to this message Reply
Advertisement
I need to create a form using Java Servlets. The Form has 2 fields.
1) Courses which is a combo box with values it gets from a courses db
2) Lecturer which is also a combo box but displays the value according to the value selected in the courses field.

Both courses and Lecturer is stored in the same db and there is a max of 2 lecturers.


Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: Reading from a db Posted: Apr 27, 2004 3:44 PM
Reply to this message Reply
I mean this in the nicest possible way but what is your query?

Adam

Jacodia Swartz

Posts: 5
Nickname: cody
Registered: Apr, 2004

Re: Reading from a db Posted: Apr 27, 2004 11:49 PM
Reply to this message Reply
Maybe I should give you the question:

Create an Access db named Courses with fileds = course,lecturer,status

Create an html page welcome.html that has a link "Students"
This link invokes a servlet that presents a form to evaluate lecturers.

The form has a drop down list named courses, which displays the available courses. It also has a drop down list named lecturers, which displays the available lecturers according to the course selected in the previous courses drop down list.

[The values in the drop down list must be updated when new values are added to the db]

How can one code this logic?

Sushil Srivastava

Posts: 6
Nickname: sushilsri
Registered: May, 2004

Re: Reading from a db Posted: May 10, 2004 3:46 AM
Reply to this message Reply
You might be better off using Javascript to narrow down your selection of the dependent drop down data

Flat View: This topic has 3 replies on 1 page
Topic: how to get the ip in domain name server Previous Topic   Next Topic Topic: Problem compiling jsp

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use