...

View Full Version : How to pass arguments to a frame without that frame aquiring the "top" position?



pml
03-16-2005, 06:27 PM
Why does the URLs refuse to display retrieved value in upper frame in a framset?
I have a static URL with two links. They both pass an argument to an ASP page that retrieves the value and should display the value of the querystring in the upper frame. The problem is that it is not the frameset and the two frames that are displayed when either of the two links are clicked (with the passed argument displayed in the upper frame). Instead the ASP-page that retrieves the value from the querystring completely covers the screen. That’s not what I want. How can I display a frameset and at the same time pass an argument to one of the frames without the receiving frame acquiring the “top”-position? Anyone who has a good suggestion on how to achieve that?

This is static.htm
<a href="TestFrame1.asp?show=yes" target="main">Send yes</a> <br>
<a href="TestFrame1.asp?show=no" target="main">Send no</a>

This is frameset.asp
<frameset rows="*,80" frameborder="yes" border="1" framespacing="0">
<frame src="TestFrame1.asp" name="main">
<frame src="TestFrame2.asp" name="bottom" scrolling="NO" noresize>
</frameset>

TestFrame1.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
MyVariable = request.QueryString("show")
%>
<html>
<body bgcolor="#996633">
You clicked: <%=MyVariable%>
</body>
</html>

TestFrame2.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<body>
</body>
</html>

glenngv
03-17-2005, 01:57 AM
This is probably what you want.

static.htm
<a href="frameset.asp?show=yes" target="main">Send yes</a> <br>
<a href="frameset.asp?show=no" target="main">Send no</a>

frameset.asp:
<frameset rows="*,80" frameborder="yes" border="1" framespacing="0">
<frame src="TestFrame1.asp?show=<%=request.QueryString("show")%>" name="main">
<frame src="TestFrame2.asp" name="bottom" scrolling="NO" noresize>
</frameset>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum