Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keep requesting client browser

Status
Not open for further replies.

dwu1998

Programmer
Jan 17, 2001
22
0
0
US
Hi all,

I have a problem and any help would be greatly appreciated.
I have three web servers on different domains. When a browser makes a request ("X") to server "A", server "A" will do something and pass the results together with original request "X" to server "B". Upon receiving the request, server "B" will talk to server "C" (maybe back and forth several times), and finally, server "C" will handle the request "X" and communicate directly with the original requesting party - the browser. My question: is this possible? If yes, how?

Many thanks in advance!
 
U could use Response.Redirect to redirect the user from server to server...
Server A has page1.asp
Server B has page2.asp
Server C has process.asp

page1.asp
<%
'put your code here

Response.Redirect &quot;page2.asp&quot;
%>

page2.asp
<%
'put your code here

Response.Redirect &quot;process.asp&quot;
%>

process.asp

<html>
<%
'put your code here
Response.Write(&quot;<h1>Thanks for using this site!</h1>&quot;)
%>
</html>

if user call page1.asp and then the page1.asp calls page2.asp and this calls process.asp and after that the user receive the response not from page1.asp but from process.asp

if u want to transmit variables from page to page u have to use Session variables...


 
Thank you shaddow!

The problem is process.asp will ask more information from page2.asp. For example, when page2.asp calls process.asp with a request for something like &quot;give me a tape&quot;,which is originally requested by the user, process.asp will ask page2.asp for something like &quot;which one?&quot;. Process.asp should ask page2.asp for the answer and Page2.asp should provide the answer, rather than the user. Still possible?

Thanks again.
 
it's possible...

u submit &quot;give me a tape&quot; from page1.asp to process.asp
in process.asp u know that u have to send to the user an html code generated by asp file page2.asp that asks the user &quot;which one?&quot; and submit the response again to process.asp wich knows that it will be process both querry from the user
&quot;give me a RED TAPE&quot;
and send it to the user

 
Thanks again.

However, page2.asp should provide the answer to &quot;which one&quot; without asking the user.
 
the page2.asp search in database and find &quot;witch one?&quot;
and then store the value in the Session variable and redirect to process.asp
if the Session variable is full process.asp search in database and return the rezult ot the user

This makes sense to U?
 
Yes it makes sense.

Maybe I didn't describe the problem clearer. Page2.asp does not know in advance which question process.asp will ask, so there is no way that page2.asp can have an answer before calling process.asp. Process.asp has no access to a database that stores the answers to its questions. Thus, this is the flow:
- page2.asp calls process.asp
- process.asp asks page2.asp for an answer
- pages.asp provide the answer to process.asp
- process.asp continues...
 
are you using ASP 3.0?

if you are, ASP 3.0 gives you access to something called Server.Execute (it seems like it might fit in this scenario)

What server.Execute does is allow the developer to run external scripts, and returning the flow back to the calling script.

ex
1: server.execute &quot;asp1.asp&quot;
2:

will process all the code in ASP1.asp, then resume back at line 2.

Unfortunately, this is only useful in pages that externally process something data. Depending on what you are doing in process.asp (eg: storing everything in a DB), this might be something that you want to look into.

see

for info.

hopefully this will help
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top