Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does this JavaScript work on Safari, but not Firefox?

I have HTML file. I tried the code on Safari and it was working fine. But when I tried this on Firefox, it’s not working.Can anyone suggest how to make it working on firefox?

On click on undo button I want to retrieve contents from the jsp file. Thats working when I used this code on safari on my mac.. but when I open the same file using firefox its not working. I am not sure is it due to browser settings or due to some other reason. I checked browser setting of firefox 3.6.12 installed on mac also it is enabled for javascript and java...

When I checked on HTTPfox it showed in Error loading content (NS_ERROR_DOCUMENT_NOT_CACHED) in the contents

Can anyone suggest whats going wrong???

like image 950
Judy Avatar asked Dec 17 '22 20:12

Judy


1 Answers

XMLHttpRequests only work when the request is on the same domain as the JavaScript making the request. So, your call to xmlHttp.open() would only work if that HTML file was hosted on csce.unl.edu.

like image 84
Paul D. Waite Avatar answered Dec 19 '22 10:12

Paul D. Waite