Common problem. It was blogged about in Feb last year (http://grover.open2space.com/node/207). Still, I'm glad you found the solution.
Shawn Patrik wrote:
Problem solved it was an extra , after the last {optionValue: '". $b ."', optionDisplay: '". $b ."'} in the php file. firefox must have ignored it while ie expected more. On 19 Okt, 16:49, Greg Riley <[email protected]> wrote:You are setting options inside a function and then trying to reference it outside of that function. Try putting var options = ''; before that first line. On Oct 19, 10:22 am, Patrik <[email protected]> wrote:Hi, I have this code and it works well in firefox but in IE it dosn't. How do I make it work in IE? If I put alert(options) inside the loop I get all the values I want so this far it's working but outside the loop if i call alert(options) nothing happens. why? $("select#kod").change(function(){ $.getJSON("artnr-ajax.php",{value: $(this).val(), where: 'kod'}, function(j){ var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j [i].optionDisplay + '</option>'; } $("select#beteckning").html(options); })

