Click to See Complete Forum and Search --> : Is it possible to pass an argument by querystring to two different frames?


Pelle
03-26-2005, 04:33 AM
I have a frameset containing two frames named "left" and "right". Their src are "left.asp" and "right.asp". In the right frame I have the following code where I send an argument to the left frame (left.asp).

My problem is how I can send the same argument to "right.asp" too. I want "MyArgument" to be sent to both frames by clicking the link, not only "left.asp".

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim MyArgument
MyArgument = request.QueryString("MyVariable")
%>

<html>
<head></head>

<body>
<a href="left.asp?MyVariable=MyArgument">Send MyArgument to left.asp and (if possible) to right.asp</a>
</body>
</html>

HaganeNoKokoro
03-26-2005, 04:53 AM
I don't know if this would work but maybe you could send the value to the frameset page and have it apply it to both frames src as a querystring variable? So in your frameset page (I'm going to call it "framepage.asp") you might have<%@ Language="JScript" %>
<% var mv=String(Request.QueryString("MyVariable")); %>
<html>
<frameset>
<frame name="left" src="left.asp<%=(mv!="undefined"?"?MyVariable="+mv:"")%>"></frame>
<frame name="right" src="right.asp<%=(mv!="undefined"?"?MyVariable="+mv:"")%>"></frame>
</frameset>
</html>and your link would be<a href="framepage.asp?MyVariable=MyArgument">Link</a>