views:

587

answers:

2
<html>
<head>
 <title></title>
 <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
 <script language="JavaScript" type="text/javascript">
  function getcsa(){
   $.get("getcsas.php",{},function(xml){
    $(xml).find('csa').each(function(){
     var csa = $(this);
     var vzid = $(csa).find('vzid').text();
     var firstname = $(csa).find('firstname').text();
     var lastname = $(csa).find('lastname').text();
     var option = '<option value="' + vzid + '">'+lastname+', '+firstname+'</option>';
     $("#agent").append(option);
    });
   });
  };
  $(document).ready(function(){ 
   getcsa();
  });
 </script>
</head>

<body>
 <select id="agent">
 </select>
</body>

The above generates a populated dropdown list in FF but not IE6...

+1  A: 

Are you really expecting XML? Perhaps, you should set that as your expected data type on the get call.

 $.get("getcsas.php",{},function(xml){
      $(xml).find('csa').each(function(){
          var csa = $(this);
          var vzid = $(csa).find('vzid').text();
          var firstname = $(csa).find('firstname').text();
          var lastname = $(csa).find('lastname').text();
          var option = '<option value="' + vzid + '">'+lastname+', '+firstname+'</option>';
          $("#agent").append(option);
      }, 'xml' );
});
tvanfosson
@Michael Bridak - Have you tried this solution?
karim79
A: 

Came back from vacation and found the trouble.

I added

header ("content-type: text/xml");

to the top of the getcsas.php file and all started working like a charm.