[Javascript] Data Loading

Håkan Magnusson hakan at backbase.com
Mon Mar 8 10:26:33 CST 2004


Crap, after some research 
(http://article.gmane.org/gmane.comp.mozilla.security/870) it seems that 
Mozilla can't do cross domain requests unless the domain you try to 
access has given you permissions to do so.

Somebody might have created a hack to bypass this, I don't know. This is 
interesting for me too, though, so I'll keep researching.

Regards,
H

Håkan Magnusson wrote:

> It is, through ActiveX with IE and built in with Mozilla. If you can 
> forgive my ugly browser check and the fact that Internet Explorer give 
> you a security alert and Mozilla doesn't have permissions to open the 
> URL (never done this cross-domain before, but my guess is it should be 
> possible) this is a good example. Change the Google URL to a local file 
> (no need to specifiy the file:// protocol, just set it to "myfile.html") 
> to see it work in both browsers.
> 
> //----
> var oRequest;
> 
> if(document.all) {
>     // Internet Explorer
>     oRequest = new ActiveXObject("Microsoft.XMLHTTP")
> }
> else {
>     // Mozilla
>     oRequest = new XMLHttpRequest();
> }
> oRequest.open("GET", "http://www.google.com/", false);
> oRequest.send(null);
> 
> alert(oRequest.responseText);
> //----
> 
> 
> Regards,
> H
> 
> Chris T wrote:
> 
>>> JavaScript XMLHttp-requests do not require a certain type of server, as
>>> a matter of fact it perfectly supports getting files from the local
>>> filesystem, and the support is quite rock solid in both IE5+ and Mozilla
>>> browsers.
>>
>>
>>
>> I've never used this component in client-side code - didn't know it was
>> available...
>>
>> _______________________________________________
>> Javascript mailing list
>> Javascript at LaTech.edu
>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 



More information about the Javascript mailing list