I hired someone to build a page for me in Wordpress. It works fine in Google Chrome, but using Internet Explorer I seem to have problems with the filter he used on the dropdown list.
This is the code I have. So the first dropdown allows the user to select a country and the second dropdown allows the user to select an airport, with a filter on the selected country. Using Internet Explorer this doesn't work at all.
I can't find anything wrong in the code, but I'm definitely no professional.
global $wpdb;
$country_query = "SELECT a.AirportName, a.AirportCode, c.CountryName, c.CountryCode FROM booking_airport as a LEFT JOIN booking_country as c ON c.CountryCode = a.AirportCountryCode";
$country_info = $wpdb->get_results($country_query);
$countries = array();
foreach($country_info as $country_details) {
if(!array_key_exists($country_details->CountryCode,$countries)) {
$countries[$country_details->CountryCode] = $country_details->CountryName;
}
$depart_airports[] = "<option value=\"$country_details->AirportCode\" class=\"d_airport $country_details->CountryCode\">$country_details->AirportName</option>";
$return_airports[] = "<option value=\"$country_details->AirportCode\" class=\"r_airport $country_details->CountryCode\">$country_details->AirportName</option>";
}
<select name="departure_country" id="departure_country" style="padding-left: 1%;">
<option value="0"><?php echo $select_country; ?></option>
<?php
foreach($countries as $k=>$v) {
echo "<option value=\"$k\">$v</option>";
}
?>
</select>
<select name="departure_airport" id="departure_airport" style="padding-left: 1%;">
<option value="0"><?php echo $select_airport; ?></option>
<?php
foreach($depart_airports as $airport) {
echo $airport;
}
?>
</select>
You can visit the website here.