File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating <select> with values from a database.

 
abhiavi kumar
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

I have a registration form, and I'm looking to populate a <select> with the values retrieved from the column of a database. How do I go about achieving this ? Here is an example for better detail.

The options of a <select> drop down list is populated from a certain column called "Manuid" which is located in a table called "Manu".

assuming the values under "Manuid" are "Sam" "Mike" "Arnie" and "Joe", I want all these names to appear when I click on the drop-down button. This is not a "fixed" column, meaning I will keep adding new names as well as deleting under "Manuid", which would mean a dynamic drop down list that changes every time I change the DB. How would I be able to do this? I'm only looking at Javascript and JDBC to achieve this... is it possible?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You definitely need more than JavaScript and JDBC. In particular, you at least need Servlets (and more Java classes)

When you say it changes every time you change the database, do you mean on the existing already rendered page? If so, you need AJAX. Otherwise, you can just look up the values in that column when loading the registration forum.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic