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

Passing a querystring 1

Status
Not open for further replies.

hamish75

Technical User
Dec 18, 2009
39
GB
I have the following frameset called index.asp:

Code:
<frameset rows="55,*,55">
  <frame name="top" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" noresize src="header.asp">
  <frameset cols="130,*">
    <frame name="left" marginheight=0 marginwidth=0 scrolling="no" noresize src=" left.asp?" frameborder="0">
    <frame name="Page" marginheight=0 marginwidth=0 scrolling="auto" noresize src="content.asp" frameborder="0">
  </frameset>
  <frame name="bottom" marginheight=0 marginwidth=0 scrolling="no" noresize src="bottom.asp" frameborder="0">
</frameset>

In content.asp I have the following:

Code:
<iframe src="[URL unfurl="true"]https://test.com/wrapper.asp?Step=Details&Product=New&Source=[/URL][b]ZZZ[/b]" scrolling="no" height="2500px" width="100%" frameborder="0">
  <p>Your browser does not support iframes.</p>
</iframe>

The Source ZZZ needs to be dynamic so I want to be able to pass any code for the source.

I thought I'd be able to do this in the iframe link:

Code:
Source=<%= Request.QueryString("Source") %>

And I would pass this value on the index.asp page like so:

index.asp?Source=YYY

Calling the "Source" only appears to work upto the index.asp but doesn’t pass to the content.asp page where the link is.

Can anyone help me sort this so the link carries the querystring too?

Thanks.


Ah dinnae ken...
 
Mmmmm, first remark: do you really need frames? It's very old skool HTML.

Oke, i presume you want the url links in your left.asp?
All you have to do is put the name of the target frame within the <A>.


I changed it a little bit for my test:

left.asp
Code:
<a href="content.asp?s=3238" target="ContentWindow">Lord of the Rings</a><br>
<a href="content.asp?s=4602" target="ContentWindow">Titanic</a>


content.asp:
Code:
<iframe src="[URL unfurl="true"]http://www.xtho.nl/detail.asp?s=<%=[/URL] request.querystring("s") %>" scrolling="no" height="2500px" width="100%" frameborder="0">
  <p>Your browser does not support iframes.</p>
</iframe>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top