www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need help about using XMLHTTP

  1. #1
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1

    Unhappy Need help about using XMLHTTP

    Hi there:

    I am trying to use XMLHTTP to develop a simple platform independent application. It's a html file that sends a xml search string to a web server, gets returned search results and show the results.

    My code to use XMLHTTP:
    ----------
    //send a search key and get back search results
    var xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    xmlHttp.open("POST", url, false);
    xmlHttp.setRequestHeader ("MessageType", "Call");
    xmlHttp.setRequestHeader ("Content-Type", "text/xml");
    xmlHttp.send(strSearch);

    var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
    xmlDoc.async= "false";
    xmlDoc.loadXML (xmlHttp.responseText);

    //display search results using xmlDoc
    ......

    code Note:
    ------------
    url: a string of server url, such as http://www.google.com/api
    strSearch: a xml string containing a user entered search key

    My problem:
    --------------
    The file works well from my local machine. I can successfully run the file in IIS folder or any other folders of my computer. However, when I upload the file into a remote server, there is always an access deny error. The error message is "Line 64, Error: Access deny". The error line is the first line of my above code. That is to create a XMLHTTP object. I searched W3C and MSN about the use of XMLHTTP, and found that both IE5+ and Netscap6 support the com. I can't figour out what's wrong.

    Can anybody help me to make it streight? Thanks in advance.

    Lee

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    I came accross the same problem,adn never I got any response back from the MSN forums,only one guy said that I need to run

    " Proxycfg.exe "

    to update the proxy setings,my problem now is that I don't know where to get that software,I can not find it on windows site for general downloads,you may have better luck..let me know if you do.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles