Link to home
Start Free TrialLog in
Avatar of luckylukevn
luckylukevn

asked on

Ajax http.open absolute URL

I want to use the function http.open but there are some problems when I try to use it with the absolute URL.
for example:
http.open('POST', 'http://langnghe.net/test/test.php')

Is it wrong? Can http.open use with absolute URL?
Avatar of bugs021997
bugs021997
Flag of India image

Try this...

http.open("POST","http://langnghe.net/test/test.php")


What error does it give
Ooops i had typo on earlier post....

It should infact be http.open("GET","http://langnghe.net/test/test.php",true);

The open() method takes three arguments. The first argument defines which method to use when sending the request (GET or POST). The second argument specifies the URL of the server-side script. The third argument specifies that the request should be handled asynchronously

Syntax :
http.open(Method,URL,Asynchronous/Synchronous)

Example :
http.open("GET","http://langnghe.net/test/test.php",true);
ASKER CERTIFIED SOLUTION
Avatar of bugs021997
bugs021997
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial