Jquery chained Selecbox problem in IE6,IE7,IE8

Hi,

I am using a code for chained select box. Its doing great in IE9, IE10, chrome, FF.

first select box is coming up based on that second is not displaying for IE6, IE7,IE8. Please let me know how to identify the issue.

Following is the code:

<?php
/**************************************
Page load dropdown results
**************************************/
function getTierOne()
{

$result = mysql_query("select distinct cmp_city from company where status='active' order by cmp_city")
or die(mysql_error());

while($tier = mysql_fetch_array( $result ))

{
   echo '&lt;option  value='.$tier['cmp_city'].'&gt;'.$tier['cmp_city'].'&lt;/option&gt;';
}

}

/**************************************
First selection results
**************************************/
if(isset($_GET[‘func’])&& $_GET[‘func’] == ‘drop_1’ ) {
drop_1($_GET[‘drop_var’]);
}

function drop_1($drop_var)
{

echo “<script type=\“text/javascript\”>
$(document).ready(function() {
$(‘#wait_2’).hide();
$(‘#drop_2’).change(function(){
$(‘#wait_2’).show();
$(‘#result_2’).hide();
$.get(\“func.php\”, {
func: \“drop_2\”,
drop_var: $(‘#drop_2’).val()
}, function(response){
$(‘#result_2’).fadeOut();
setTimeout(\“finishAjax_tier_three(‘result_2’, '\”+escape(response)+\”')\", 400);
});
return false;
});
});

function finishAjax_tier_three(id, response) {
$(‘#wait_2’).hide();
$(‘#’+id).html(unescape(response));
$(‘#’+id).fadeIn();
}
</script>";
$result = mysql_query(“SELECT DISTINCT cmp_name,cmp_branch FROM company WHERE cmp_city=‘$drop_var’ AND user_type = ‘3’ order by cmp_branch”) or die(mysql_error());
echo ‘<select name = “userid” id = “drop_2” class = “required”>
<option value = " “> Choose Agent </option> ‘;
while($drop_2 = mysql_fetch_array( $result )) {
echo ‘<option value = "’.$drop_2[‘cmp_name’].’”>’.$drop_2[‘cmp_branch’].’ - ‘.$drop_2[‘cmp_name’].’</option>';
}
echo ‘</select></td>’;

}

/**************************************
Second selection results
**************************************/

if(isset($_GET[‘func’])&& $_GET[‘func’] == ‘drop_2’ ) {
drop_2($_GET[‘drop_var’]);
}
function drop_2($drop_var)
{

$result = mysql_query("SELECT * FROM company where cmp_name = '$drop_var'") or die(mysql_error());
while($drop_3 = mysql_fetch_array( $result )) {
echo '&lt;/td&gt;&lt;/tr&gt;&lt;td colspan = "3"&gt;Telephone  : &lt;input type = "text" name = "userTelephone"  value = "'.$drop_3['cmp_phone'].'" readonly = readonly class = "required"&lt;/td&gt;';
echo '&lt;td colspan = "3"&gt; Address : &lt;textarea rows = "2" cols = "60" name = "userAddress" readonly = readonly class = "required" &gt; '.$drop_3['cmp_address'].' &lt;/textarea&gt; &lt;/td&gt;&lt;/tr&gt;';
break;
}

}

What is the HTML and JavaScript code that is generated for the page? It will be much easier for us to determine what is going on if we can see that instead.

Hi Paul,

Thank you for responding my question. When I checked from F12 developer toolbar I found document mode was IE5 quirk.

I am using <?php header(‘X-UA-Compatible: IE=edge’); ?>

as solution to it since in standard mode its working fine.