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

How to control a framed page from a non-frame page

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I thought this might help anyone else who is trying to figure out how to control the source documents of a frameset from a link on another page. I thought originally you would use javascript, but it turns out it's pretty straightforward in asp.

Anyway, you use ASP "QueryString" to do this. In the link that you want to control frames with you put somehing like:

<A HREF=&quot;Frames.asp?myVariable1=somepage.html&myVariable2=otherpage.html>myexample</a>

this will pass somepage.html and otherpage.html in the querystring found in the address window to whatever page comes next, in this case &quot;frames.asp&quot;

The trick is to remember the &quot;?&quot; and that means whatever comes after it will be passed in the QueryString.

Then, on frames.asp page, you do something like this for each frame you want to specify the source for:

<frame src=&quot;<% Response.Write (Request.QueryString (&quot;myVariable1&quot;))%>&quot; frameborder=&quot;NO&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; name=&quot;frameSide&quot; scrolling=&quot;NO&quot; noresize>

How much more water would there be in the ocean if it weren't for sponges?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top