Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    I'm trying to have it so that when an option is selected from a dropdown list, it will automatically create a new dropdown to the right of it with options based upon the option selected in the first one. I know that onClick will be used for part of this, but how can I have it create a new dropdown without reloading the whole page? I have a feeling I may have to use iFrames, but I don't know much about this and its alternatives.

    Also, is there a way to have a dropdown pass on more than one variable value?
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Make a javascript function, make_dropdown() or something like that. In it, have a document.write your extra menu stuff. On that onClick put onClick = "make_dropdown();" Also what do you mean more than one variable? There's only one selectable option..
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Only one selectable option is correct. I was just wondering if there was a way to have it send 2 variables when you select one option. The only way I can think of doing it is by putting both variables in a new string, then separating them later.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  5. #4
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Anyone have the code to do this? Not quite sure how to build it. The only other way I can think of doing this is with frames and a simple form, but that would be a bit bulky.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  6. #5
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Also, I should mention that all of the fields in the dropdown are created in php from data in a table.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  7. #6
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    http://www.zend.com/zend/tut/drop-down.php

    Overly complicated code, but I think with the class they made, it's generic enough where you can take their example and modify it for what you need... I think... I'm gonna test it out with my code (theirs works fine), and we'll see what happens!
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:41 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com