Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Malaysia
    Posts
    29

    Angry Unanswered: how to populate two different drop down list ?

    I have two drop down list. When the user click on the first drop down list, immediately, the second drop down list must populate a list that refers to the first drop down list.
    Lets say I have the first drop down list for states in the country, and the second drop down list for the list of schools within that specific state. Let say the user click on the state 'Chicago' from the first drop down list, the second drop down list must populate automatically a list of schools in Chicago.
    How should I do this ?
    Please help.

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    Is this a local application (with Perl/Tk or something like this) or a web-based application?

    With Perl/CGI you can't do it without a request.

    Please post some details!
    board.perl-community.de - The German Perl-Community

  3. #3
    Join Date
    Mar 2004
    Location
    Malaysia
    Posts
    29

    its a web application

    Originally posted by reneeb
    Is this a local application (with Perl/Tk or something like this) or a web-based application?

    With Perl/CGI you can't do it without a request.

    Please post some details!

    Reneeb...its a web based application...what do u mean by 'cant do it without a request ?' if it cant be done, what do u suggest ?

  4. #4
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    you have a form with the first drop down list. Then you send this form to the webserver. And a skript searchs for the entries referring to the sent parameter and prints both drop down lists.

    what i mean you can see on http://www.urlaub-im-ferienpark.de . There you can choose a country in a drop down at the right. Click on "Go", then you will see a second dorp down at the left where all vacation sites of the chosen country are shown.

    CGI-scripts are server side scripts and they don't know what a user does, so you have to tell it what the user has chosen. That's what I mean with 'You can't so it without a request'...
    board.perl-community.de - The German Perl-Community

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •