Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2005



Tip: Looking for answers? Try searching our database.

XMLHttpRequest post hangs on Firefox / Mozilla

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Lawton - 30 Nov 2005 12:40 GMT
Hello, the following bit of (stripped down) code works fine in IE, but on Gecko
based browsers -
Firefox 1.0.7
Mozilla 1.7.12

it just hangs on the xmlhttpOpen

//    IE object - works fine
//  var   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")

    var    xmlhttp =new XMLHttpRequest();
    xmlhttp.Open("POST","http://www.anythin.com",false);

xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

    xmlhttp.send("data");

I'd be grateful for any ideas.

Cheers
--
Jim
a Yorkshire polymoth
cicap - 30 Nov 2005 12:44 GMT
> Hello, the following bit of (stripped down) code works fine in IE, but on
> Gecko
[quoted text clipped - 15 lines]
>
> I'd be grateful for any ideas.

What is the problem?
Martin Honnen - 30 Nov 2005 13:04 GMT
>      var    xmlhttp =new XMLHttpRequest();
>     xmlhttp.Open("POST","http://www.anythin.com",false);

JavaScript is case sensitive so use
  xmlhttp.open("POST", "url", false);
and I guess all is fine. Check the JavaScript console for error messages
if you still have problems. You need to be aware too that script in a
HTML document loaded via HTTP can with normal security settings only
connect back to the HTTP server the HTML document has been loaded from.

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

Jim Lawton - 30 Nov 2005 13:42 GMT
>>      var    xmlhttp =new XMLHttpRequest();
>>     xmlhttp.Open("POST","http://www.anythin.com",false);
[quoted text clipped - 5 lines]
>HTML document loaded via HTTP can with normal security settings only
>connect back to the HTTP server the HTML document has been loaded from.

Yup - you got it. I was using Venkman, and developed blinkers. Because
everything was working fine in IE I was looking in the wrong place.

I'll have to pass the remote data through my "home" server.

Cheers, thanks for the help...
--
Jim
a Yorkshire polymoth
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.