• 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

Dynamically create a list of combo box`s, how to get value

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I`m creating a page with a dynamic list of combo box`s from my database.
The idea is that the user can select what options he need. But how do i get
the data back? The name attribute i`ll have to set to the 'id' of the database row.

So i`m not to sure how many options can be listed on my page, so how do i know to get the selected values back?

Please, any suggestions would be welcome?

Thanks
Derick
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is asked a lot lately...

Server side solution:
Basically you need to do a form submission back to the server with an onchange event on the select element.

You may want to look at this post: https://coderanch.com/t/115659/HTML-JavaScript/Select-Box-one-page-second


Client Side Solution:
Search on google for JavaScript doublecombo. Basically you write out arrays with your datatbase information when the page loads.

Eric
[ February 22, 2005: Message edited by: Eric Pascarello ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic