http GET request
-
hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,
-
hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,
er.... Please can you attach your code?
-
hello, i am building an http client server communication. both client and server are placed on the same ip (on an external equipment). inside the html document i wrote a script sending an http "get" request. javascript has an open function that one of its attribues it url. what do i have to fill in this field? that you,
Got no meaning. I think you are using some javascript code that initiates one AjaX request. Please let me know what exactly you are looking for so that we could help u. :doh: :doh:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Got no meaning. I think you are using some javascript code that initiates one AjaX request. Please let me know what exactly you are looking for so that we could help u. :doh: :doh:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
hello, thank you very much for your help. The code bellow is the js i wrote in my html doc. (It is taken from w3schools.)
try
{// Firefox, Opera 8.0+, Safari, IE7
xmlHttp=new XMLHttpRequest();
}
catch(e)
{// Old IE
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
alert ("Your browser does not support XMLHTTP!");
return;
}
}
xmlHttp.open("GET",url,false);//here is my question.
//what do i have to write as url?!?!
xmlHttp.send(null);//thats the way of sending get messagesWhat i wrote as url is: "http://"+the ip address of the equipment i am working on (http://10.0.4.150). As i have already mentioned, both client and server are placed on the same equipment. The server didn't get the request at all. I know that something does work because i got the html doc by an http request. I hope i explained myself properly. Thanks again,
-
hello, thank you very much for your help. The code bellow is the js i wrote in my html doc. (It is taken from w3schools.)
try
{// Firefox, Opera 8.0+, Safari, IE7
xmlHttp=new XMLHttpRequest();
}
catch(e)
{// Old IE
try
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
alert ("Your browser does not support XMLHTTP!");
return;
}
}
xmlHttp.open("GET",url,false);//here is my question.
//what do i have to write as url?!?!
xmlHttp.send(null);//thats the way of sending get messagesWhat i wrote as url is: "http://"+the ip address of the equipment i am working on (http://10.0.4.150). As i have already mentioned, both client and server are placed on the same equipment. The server didn't get the request at all. I know that something does work because i got the html doc by an http request. I hope i explained myself properly. Thanks again,
You cant access other web site using AJAX. AJAX can only access the pages that are within the same virtual directory. Say your page which calls the AJAX is
http://www.abc.com/mno.aspx
And it callsxmlHttpRequest.open('http://www.abc.com/xyz.aspx')
it will work fine butxmlHttpRequest.open('http://www.xyz.com/abc.aspx')
will give"Access Denied"
Hope you understand. :rose:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.