Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   How to run one ASP page from Another ASP Page (http://www.velocityreviews.com/forums/t790104-how-to-run-one-asp-page-from-another-asp-page.html)

Howard Rothenburg 09-10-2003 08:54 PM

How to run one ASP page from Another ASP Page
 
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 (justin@jtp.dircon.co.uk)
>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



All times are GMT. The time now is 08:18 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57