Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: ocean10000
I am using MSXML2.XMLHTTP.4.0 to retrieve data from an eternal web page (other domain) and displaying the contents in my local web page. This works perfectly when I run it from my local system. When I upload it to my Web Server and access it, then it does not work. The following is the code:
objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
I am getting the "access denied" error exactly at the third line where the URL is passed. Can anyone help me with this?
Also, please let me know if there are any other methods to retrieve the data without using Msxml2.XMLHTTP.4.0.
It is working pefectly fine, when I try to fetch a webpage present in my own domain. But, it does not work if I try to fetch a web page from an other domain. This is very important for me. Can you suggest something for this? Anything.
On Error Resume Next
If err.Number <> 0 Then
var xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
var returnValue = xmlHTTP.responseText;
I am getting access denied error at line 2 at xmlHTTP.open call. Although this when I run locally (by giving file path instead of url) works well.