Problem with XMLHTTP.Open

admin

Administrator
Staff member
I am using XMLHTTP (the base version) object on client to get informationfrom another server in the same NT domain. Following is the excerpt fromthe code I use from client.XMLHTTPReq = new ActiveXObject("Microsoft.XMLHTTP");if (XMLHTTPReq == null){alert("XMLHTTP object could not be created")return false;}XMLHTTPReq.Open("POST", "http://myserver/myvirtualdirectory/some.asp",false);urlDOMDoc = new ActiveXObject("Microsoft.XMLDOM");urlDOMDoc.loadXML (dlv);XMLHTTPReq.Send(urlDOMDoc);My problem is with the Open method of XMLHTTP object. Before executing theOpen method IE displays a warning message "This page is accessing informationthat is not under its control. This poses a security risk. Do you wantto continue?" If, I click on Yes, the script executes without any problem.I am wondering is there a way to turn off this message? I found a way toturn this off as follows1)Click on Tools --> Options to display "Internet Options" dialog.2)Click on Security Tab3)Select Local intranet zone (at the top of the dialog box)4)Click on "Custom Level" button to display "Security settings" dialog.5)Scroll down untill you see "Miscellaneous" section.6)Set the "Access data sources across domains" to Enable.7)Click on OK to dismiss "Security settings" dialog.8)Click on "Apply" followed by "OK" to save the settings and close the "InternetOptions" dialog.Is there a way to turn this message off programmatically?Thanks in advance for your help.
 
Back
Top