I have two dropdown menus, im having trouble with making the options for the second dropwdown to be dependent on the choice on the first dropdown menu.
$city="";
$formcontent =<<<EOT
<label>Assumed Bitten City : </label>
<select name="AssumedBittenCity" id="AssumedBittenCity">
<option value="0">Make a Selection</option>
<option value="Caloocan City">Caloocan City</option>
<option value="Las Piñas City">Las Piñas City</option>
<option value="Makati City">Makati City</option>
<option value="Malabon City">Malabon City</option>
<option value="Mandaluyong City">Mandaulyong City</option>
<option value="Manila City">Manila City</option>
<option value="Marikina City">Marikina City</option>
<option value="Muntinlupa City">Muntinlupa City</option>
<option value="Navotas City">Navotas City</option>
<option value="Parañaque City">Parañaque City</option>
<option value="Pasay City">Pasay City</option>
<option value="Pasig City">Pasig City</option>
<option value="Pateros City">Pateros City</option>
<option value="Quezon City" $city="Quezon City">Quezon City</option>
<option value="San Juan City">San Juan City</option>
<option value="Taguig City">Taguig City</option>
<option value="Valenzuela City">Valenzuela City</option>
</select><br></br>
<label>Assumed Bitten Street : </label>
<Select name="AssumedBittenStreet" id="AssumedBittenStreet">
<option value="0">Make a Selection</option>
EOT;
if($city="Quezon City"){
$formcontent.=<<<EOT
<option value="Kamuning Road">Kamuning Road</option>
<option value="K-1st Street">K-1st Street</option>
<option value="K-2nd Street">K-2nd Street</option>
<option value="K-3rd Street">K-3rd Street</option>
<option value="K-4th Street">K-4th Street</option>
<option value="K-5th Street">K-5th Street</option>
<option value="K-6th Street">K-6th Street</option>
<option value="K-7th Street">K-7th Street</option>
<option value="K-8th Street">K-8th Street</option>
<option value="K-D Street">K-D Street</option>
<option value="K-F Street">K-F Street</option>
<option value="K-Eth Street">K-Eth Street</option>
<option value="Eulogio Rodriguez Sr. Avenue">Eulogio Rodriguez Sr. Avenue</option>
<option value="Balete Drive">Balete Drive</option>
<option value="Park Ave">Park Ave</option>
<option value="L. Sianghio Street">L. Sianghio Street</option>
<option value="Teodoro Gener Street">Teodoro Gener Street</option>
<option value="Judge Damien Jimenez Street">Judege Damien Jimenez Street</option>
<option value="Scout Castor Street">Scout Castor Street</option>
<option value="Scout Lozano Street">Scout Lozano Street</option>
<option value="Scout Dr. Lazcano Street">Scout Lazcano Street</option>
<option value="Scout De Guia Street">Scout De Guia Street</option>
<option value="Scout Torillo Street">Scout Torillo Street</option>
<option value="Scout Ybardolaza Street">Scout Ybardolaza Street</option>
<option value="Scout Gandia Street">Scout Gandia Street</option>
<option value="Scout FuentebellaStreet">Scout Castor Street</option>
<option value="Scout Fernandez Street">Scout Fernandez Street</option>
<option value="Scout Limbaga Street">Scout Limbaga Street</option>
<option value="Scout Rallos Street">Scout Rallos Street</option>
<option value="Scout Tuason Street">Scout Tuason Street</option>
<option value="Scout Tobias Street">Scout Tobias Street</option>
<option value="Scout Santiago Street">Scout Santiago Street</option>
<option value="Scout Reyes Street">Scout Reyes Street</option>
<option value="Scout Magbanua Street">Scout Magbanua Street</option>
<option value="Scout Ojeda Street">Scout Ojeda Street</option>
<option value="Scout Chuatoco Street">Scout Chuatoco Street</option>
EOT;
currently this does not work, and I have no knowledge on javascript. What basic/simple solution can I do with this?
Comments
Post a Comment