473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Cross domain calls issue in Firefox and Safari using AJAX

Hi,

I have implemented prototype.js file to use AJAX calls in my application. I need to call cross domain to get some value from different server. The HTML and prototype file are hosted in https://wwww.myserver.xyz.com.I need to call other sever which URL ends with same as my server “xyz.com “(https://wwww.otherserver.xyz.com)

The below mentioned code is working fine only in IE browser, But it is not working in Firefox and Safari browsers.Could you please assist me?.Your help is very appreciated.

Thanks a lots,
Saravanan

Sample Code:

Expand|Select|Wrap|Line Numbers
  1.     function loadResponse()
  2.     {
  3.         //This my sever where html and js files are hosted
  4.         //https://wwww.myserver.xyz.com;
  5.  
  6.         //need to call other sever which URL ends with same xyz.com
  7.         var url = 'https://wwww.otherserver.xyz.com'
  8.  
  9.         document.domain ='xyz.com';
  10.  
  11.         new Ajax.Request(url,
  12.         {
  13.             method:'get', onSuccess: function(transport)
  14.             {
  15.                 response = transport.responseText || "no response text";
  16.                 parseResponse();
  17.             },
  18.             onFailure: function()
  19.             {
  20.                 parseAlternativeResponse();
  21.             }
  22.         });
  23.  
  24.     }
Oct 25 '08 #1
1 4386
acoder
16,027 Expert Mod 8TB
See same origin policy. Is it four Ws and can it not be a single domain?
Oct 26 '08 #2

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

Similar topics

4
by: Adrian | last post by:
can someone explain the cross domain security re AJAX in IE? I have a page that calls a web service (WS) from another domain (the target browser is only IE6) and displays it's results! all works...
17
by: Arjen | last post by:
Hi, I want to reload 2 divs at one click. Ive tried: <a href = "javascript:void(0);"...
6
by: Simon | last post by:
Hi All, An experiment i'm doing requires requires a synchronous cross-domain request, without using a proxy. I wondered if anyone had any ideas to help me achieve this. Below is what I have...
6
by: Bart Van der Donck | last post by:
Hello, I'm presenting my new library 'AJAX Cross Domain' - a javascript extension that allows to perform cross-domain AJAX requests. http://www.ajax-cross-domain.com/ Any comments or...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
6
by: totalstranger | last post by:
Using an AJAX Javascript function that works fine if it's in the primary domain www.arnb.org, but suffers from a security error when attempted from a subdomain, thepatsyreport.arnb.org In the...
9
by: euroahmed | last post by:
I have written a Ajax code to get the data from the URL and i am able to get the output in the explorer but getting the below error in Mozilla firefox .Kindly anyone help me in this regards. ...
6
by: ampo | last post by:
Hello. Can anyone help with cross-domain problem? I have HTML page from server1 that send xmlHTTPRequest to server2. How can I do it? Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.