Skip to content Skip to sidebar Skip to footer

How To Format A Drop Down List To Use Only Selected Answers Depending On First Dropdown

http://whodateswhere.com/auto/ This is my site I'm building. Where it shows: Make: Model: I'd like to know, after the first is chosen, how do I let the second drop down know it wil

Solution 1:

I suggest you check out my answer here.

http://jsfiddle.net/tBrXt/2/

In response to how you would code the second file, use the switch/case statement:

<?php
    switch($_GET['make']) {
        case "acura":
            echo json_encode(array("MDX","RDX","RL","TL","TSX","ZDX"));
            return;
        case "ford":
            echo json_encode(array('f150','mustang','etc'));
            return;
    } 
?>  

Post a Comment for "How To Format A Drop Down List To Use Only Selected Answers Depending On First Dropdown"