I am firing an ajax call to get json response which I am populating in the dropdown.
Code is:
var ajaxURL = "abc.ajax";
var fireAjax = new Request.JSON({
url: ajaxURL,
method:'GET',
onSuccess:function(resultjson){
if(resultjson.length!=0){
var elSelect = new Element('option',{'html':'First component','value':'All'}).injectInside($('vehicletype'));
resultjson.each(function(vName){
var elOptions = new Element('option',{'value':vName,'selected':'selected' }).setHTML(vName).injectInside($('vehicletype'));
});
sschecker[0].registerAnotherElement($('vehicletype'));
}
}
}).send();
This is working fine in IE8, firefox, etc.
There is no reason why it shouldn't work on IE7 (even IE6).
I've tested it (and changed a few things) of your code:
I've changed the method to POST and added the data.. just to be able to test it in jsfiddle http://jsfiddle.net/F7G9Y/2/.. its working on IE7 (don't have IE6 sry)
in my opinion (and my experience), it's usually due to a malformed JSON, most of the time because of an extra coma. So json strings like this :
will be ok in Firefox, Chrome but not on IE
Hope this helps