473,396 Members | 1,875 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,396 software developers and data experts.

AJAX call program from another server

1
i'm doing a lot of AJAX PROGRAM in my website
1. madads.myadsworld.com
2. eshop.myadsworld.com
3. syokchat.myadsworld.com

i just want to ask:
can i call my php program from another server.normal way getjumrek.php program is in same server. Can i write var gettxt = http://192.168.1.40/getjumrek.php (this case current server is 192.168.1.41 but there is also getjumrek.php in 192.168.1.40)

example

Expand|Select|Wrap|Line Numbers
  1. var gettxt = "getjumrek.php";
  2. var httpReceive5Txt = getHTTPObject();
  3. function receivetxt() {
  4.     //alert('aa');
  5.     if (httpReceiveTxt.readyState == 4 || httpReceiveTxt.readyState == 0) {
  6.       httpReceiveTxt.open("GET",GetTxt + '?lastkey=' + lastkey, true);
  7.     httpReceiveTxt.onreadystatechange = handlehHttpReceiveTxt;
  8.     httpReceiveTxt.send(null);
  9.     }
  10. }
  11.  
  12.  
  13.  
  14. //deals with the servers' reply to requesting new content
  15. function handlehHttpReceiveTxt() {
  16. }
  17.  
  18. getHTTPObject() {}
Dec 1 '07 #1
1 1362
phvfl
173 Expert 100+
Standard AJAX calls can not be cross domain, so you can only call to the same server.
Dec 1 '07 #2

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

Similar topics

31
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked...
4
by: Mr. SweatyFinger | last post by:
OK I don't understand ajax, but my page makes a quick ajax call to another page and returns the results. that works ok. That other page is supposed to set a cookie. That doesn't seem to work....
4
by: pbd22 | last post by:
Hi. I have an ajax question. I am wondering if it is possible to get the response from a method within a given page, and that function alone? Traditionally, I have been getting the response...
13
by: Marvin Zhang | last post by:
Hi, I'm not familiar with web programming, but I have a problem here. I have a page. When a user click one button on it, I will use AJAX to request a PHP script which will do a bunch of tasks,...
8
by: Samik R. | last post by:
Hello, I am using the innerHTML property of a div placeholder to update the contents, and the HTML is provided from a perl script on the server side. The perl script gets called through AJAX when I...
0
by: Nightcrawler | last post by:
I hope this is the right group for this question. I recently started looking into AJAX and I am doing the following: I have a repeater (dummydata) that is bound to a datatable (Articles). Each...
2
by: majidtou | last post by:
Hi , We have an HTML page which is using AJAX. We make an AJAX call which retrieves a table with mutiple rows. We need to extend this functionality. In the table, we want to put a button on each...
6
by: KDawg44 | last post by:
Hi, My responseXML is always null on my AJAX call. When I browse directly to the PHP script I am calling, the XML file shows up just fine. I have read that if a returned XML file is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.