ajax error with javascript -
i using following function has worked fine until now, getting following error:
[exception... "component returned failure code: 0x80004005 (ns_error_failure) [nsixmlhttprequest.send]" nsresult: "0x80004005 (ns_error_failure)" location: "js frame :: http://www.myurl.info/manage/sharedlibrary.js :: getfile :: line 406" data: no]
note error line indicated below directly after comment in code block.
additional research apparently common issue firefox. have cleaner way [this]?1
the function has worked until , follows:
function getfile(url){ var ajax = null; try{ if(window.xmlhttprequest){ ajax = new xmlhttprequest(); }else{ ajax = new activexobject("microsoft.xmlhttp"); } if(ajax){ ajax.open("get", url, false); //the line below line 406 in error code. ajax.send(null); return ajax.responsetext; }else{ return false; } }catch(err){ var = prompt("", err); } }
i using firefow browser. if crash firefox , relaunch error no longer present yet resurface after bit of time. use case not totally precise.
is there variable should resetting each request?
if try , catch, error seems break underlying functionality not reset until browser relaunched.
any appreciated!
try
ajax.onreadystatechange = function(){ var text = ajax.responsetext};
before
ajax.send(null);
Comments
Post a Comment