jquery AJAX error in Mozilla but not in IE

GuttolondoniA

New Member
I am reading some properties from an XML file and inserting them into HTML snippets. I originally tested everything in IE but then switched to Firefox in order to use Firebug to debug the javascript/jquery.My original code works well (without any errors) in IE, however, in Firefox the AJAX call to open the document does not succeed. Below are a couple simple js test functions I am using that mirror the actual functionality of my program. How can I get this to work in Firefox? Thanks!\[code\]$(document).ready(function() { $.ajax({ type: "GET", url: "../xml/psfs.xml", dataType: "xml", success: function(xml) { parseXml(xml); alert('success'); }, error: function(xml) { alert('error'); } });});function parseXml(xml) { $(xml).find("DOMAIN").each(function() { $domain = $(this); var title = $domain.attr("title"); $("#domains").append(title); });}\[/code\][EDIT]After inserting console.log(arguments) into error statement, I receive the following in Firbug..."[Exception... \"Access to restricted URI denied\" code: \"1012\" nsresult: \"0x805303f4 (NS_ERROR_DOM_BAD_URI)\" location: \"file:///M:/index/js/jquery-1.7.2.js Line: 8240\"]"I need to run this application locally and cannot put it on a webserver. Any suggestions?[UPDATE]Thanks to comments, I inserted the console(arguements) statement in the error block. I found that Firefox does not allow access of localhost resources or resources from another domain.
 
Back
Top