I am facing problem with the select box, options are not visible on my wordpress site. I have extracted the country name from an xml file using JavaScript and used as the options of the select box. Firefox
and Chrome
shows the options as required but IE
does not show the options of countries. Could you please help me how can I resolve this problem and show same as Chrome and firefox dpes.
Here is my site and the code is given below :
$(function() {
$.get( 'ttalk.xml', {}, function(data) {
var optionHtml = '<option value="Please Select" selected="selected">Please Select</option>';
$(data).find('item').each(function() {
var _item = $(this);
html = '<option value=' + _item.find('code').text() + '>';
var name = _item.find('country').text();
html += name.split('+').join(' ')+ '</option>';
optionHtml += html;
});
$('#destinationList').html(optionHtml);
$('#destination').html(optionHtml);
}, 'text' );
});
You may try this
I think you may have an issue with the encoding of the xml doc.
Web Dev toolbar is show me this error.
While it still works in FF and Chrome, IE8 may be having extreme issues with it.
-d