Reputation: 535
I'm making a web page using JS and JQuery with HTML and CSS, this webpage considered to extract some data from an XML file and display it as a drpodown menu, I'm using a JQuery library called HeapBox as a customized dropdown menu.. every thing goes OK when dealing with firefox:
but when coming to chrome the xml data didn't shown:
$('#dummy').load('cafe.xml',function() { // dummy is a regular Div <div id="dummy> </div>
initialize();
})
function initialize(){
ct=$('menu').children().length;
for(var cati=0;cati<=ct-1;cati++)
{
cats[cati]=$('menu').children().eq(cati).prop('nodeName');
$('.basic-example').append('<option id="option1" value="option1">'+realname+'</option>'); //.basic-example is a heapbox integrated class
}
$(".basic-example").heapbox({'onChange':function(){loadmenu()},effect:{type:"fade",speed:"slow"}});
}
Upvotes: 0
Views: 111
Reputation: 117324
More interesting than the code here is the adressbar partially visible in the first screenshot. You are running this on local filesystem, but chrome doesn't allow AJAX on local filesystem.
Use a webserver to test your application.
Upvotes: 1