469,625 Members | 1,568 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Problem with XMLHttpRequest and Firefox

mickey0
142 100+
Hello,
I'm trying to use XMLHttpRequest() with this code below but with firefox doesn't work, the exception raise! with IE6 (using new ActiveXObject('Microsoft.XMLHTTP');) all work. Why with firefox and Opera too it doesn't work?
Expand|Select|Wrap|Line Numbers
  1.     var req="null"; 
  2.     try {             
  3.       req = new XMLHttpRequest();
  4.     }
  5.  
  6.     catch (e) {     
  7.         alert("problem ");                 
  8.     }    
  9.  
Jan 19 '08 #1
7 1539
gits
5,390 Expert Mod 4TB
hi ...

is there any other code that encloses the posted one? the posted code just works fine in FF 2.0.0.11 ...

kind regards
Jan 19 '08 #2
mickey0
142 100+
it was a little my error; However now the FF console gets this:
Error: uncaught exception:Permit denied method called XMLHttpRequest.open
to note: on IE6 (as I wrote before) it works.
Jan 19 '08 #3
gits
5,390 Expert Mod 4TB
seems to be a cross-domain issue?
Jan 19 '08 #4
mickey0
142 100+
seems to be a cross-domain issue?
Is it a question? I don't know.....what am I wondering, again, why with IE it's OK (and the req.responseText is ok)

EDIT: Opera console say this:
Expand|Select|Wrap|Line Numbers
  1. JavaScript - out.html
  2. Event thread: load
  3. Error:
  4. name: Error
  5. message: Security violation
  6.  
Jan 19 '08 #5
gits
5,390 Expert Mod 4TB
since it had a questionmark at the end it should have been a question ;) ... so opera says the same as FF ... could you post the code you use for the request? the page and the requested data has to come from the same domain ... otherwise the XMLHttpRequest will not work ...

kind regards
Jan 19 '08 #6
mickey0
142 100+
probably is the last you said (and this explain why IE work. Is this?). However: is there a way to do the request with FF?
Jan 19 '08 #7
Markus
6,050 Expert 4TB
probably is the last you said (and this explain why IE work. Is this?). However: is there a way to do the request with FF?
Post the full code you use!

He can't tell you whats wrong just by looking at an error report.
Jan 19 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Sergey Surkov | last post: by
34 posts views Thread by Simon Wigzell | last post: by
4 posts views Thread by tcole6 | last post: by
5 posts views Thread by Peter Michaux | last post: by
1 post views Thread by Iain Adams | last post: by
3 posts views Thread by Andrewh | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.