How to run one ASP page from Another ASP Page

Discussion in 'ASP General' started by Howard Rothenburg, Sep 10, 2003.

  1. Here is an example of running a different ASP page from a current web
    page, using Javascript.

    function window_onunload() {
    var objSrvHTTP;
    var objDoc;
    var URL = "http://" + window.location.host + "/ASPPageToCall.asp;
    objSrvHTTP = new ActiveXObject("MSXML2.XMLHttp");
    objDoc = new ActiveXObject("MSXML2.DOMDocument");
    objSrvHTTP.open ("POST", URL, true);
    objSrvHTTP.send ();
    objDoc = objSrvHTTP.responseXML;
    alert(objDoc.xml);
    }

    ---
    ASP page called (ASPPageToCall.asp)
    <%
    Dim strSomeData
    strSomeData = "Hello World"
    Response.ContentType = "text/xml"
    response.write "<ReturnValue>" & strSomeData & "</ReturnValue>"
    %>

    Please feel free to suggest any improvements to the code.

    >From: Justin ()
    >Subject: run one asp page from another
    >Newsgroups: microsoft.public.inetserver.asp.general
    >Date: 2001-08-15 06:15:32 PST


    >Does anyone know of a way to run an ASP page from another ASP page,

    and
    >return output of the first page to a variable
     
    Howard Rothenburg, Sep 10, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qwerty
    Replies:
    3
    Views:
    9,300
    Scott Allen
    Sep 30, 2004
  2. nishadixit
    Replies:
    5
    Views:
    1,276
    Joe Discar
    Jun 1, 2005
  3. loveNUNO
    Replies:
    2
    Views:
    949
    loveNUNO
    Nov 20, 2003
  4. Robert Cohen
    Replies:
    3
    Views:
    291
    Andrew Durstewitz
    Jul 15, 2003
  5. Navya Amerineni

    how to run a ruby program from another one

    Navya Amerineni, Feb 28, 2006, in forum: Ruby
    Replies:
    2
    Views:
    104
    Robert Klemme
    Feb 28, 2006
Loading...

Share This Page