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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using querystring across windows.

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I know that you can pass a variable from page to page using querystring like this:

Code:
<a href=&quot;MyFile.asp?Test='hello'&quot;>

and then retrieve it on the the recieving file, (in this case MyFile.asp) using request.querystring (&quot;Test&quot;)


But...

I have a situation where I'd like to open a new window, so efftively, I now have:

Code:
<a href='#' onClick=window.open('MyFile.asp','FileName','height=600px,width=370px'); return false;>


How (or is it possible) do you pass information from one page to another in this case?

I'd guess you'd have to use some kind of session variable, but I'm not sure exactly how.

What I'm trying to do is capture the text of the hyperlink that the user clicked that opened the new window, and have it say something like, &quot;you chose x&quot;

Hope you can help - thank you. Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects
 
a href='#' onClick=window.open('MyFile.asp?querystring','FileName','height=600px,width=370px'); return false;>

exactly like what you do in common page.

Ted

 
You can use the querystring exactly the way you have used in normal situations.

Hitesh
 
To add to the above point, here is an example:
Code:
<a href='#' onClick=window.open('MyFile.asp?choice=first','FileName','height=600px,width=370px'); return false;>

Other page:
You picked <%=Request.QueryString(&quot;choice&quot;)%>

Hope that helps,
-Tarwn &quot;If you eat a live toad first thing in the morning, nothing worse will happen all day long.&quot; - California saying
&quot;To you or the toad&quot; - Niven's restatement of California saying
&quot;-well most of the time anyway...&quot; - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
 
yes - this does help - thank you all very much. Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top