|
-
Aug 9th, 2002, 02:10 PM
#1
Thread Starter
Fanatic Member
request.querystring with framesets?
I have a nested frameset doc.
looks like this
Code:
<FRAMESET rows="80,*" border=0 noresize>
<FRAME NAME="fraTop" SRC="top.asp"scrolling=no marginheight=0 marginwidth=0>
<frame name="fraBot" src="bot_frame.asp" scrolling=no marginheight=0 marginwidth=0>
</FRAMESET>
fraBot is another frameset that calls a left page(navigation) and a right page(content)
the content page is an .asp page that looks for parameters in the querystring.
seems like it should work but it does not.
the code in my content page is very simple.
Code:
if request.querystring("action")="go" then
response.write "welcome"
else
response.write "your not welcome"
end if
any suggestions?
I can't use session variables or I would do it that way.
-
Aug 9th, 2002, 04:24 PM
#2
Lively Member
well if you have just one query then do it like this:
If Request.QueryString="welcome" Then
response.write "welcome"
Else
response.write "***** off"
End If
and the URL should be just "http://your.server.something/default.asp?welcome"
-
Aug 9th, 2002, 04:42 PM
#3
Thread Starter
Fanatic Member
i may have more than one query but the problem seems to be that i can't access the querystring.
i can see all the variables in the querystring, i just can't get them in the nested frameset doc.
i think i fixed it by using cookies.....
should work.
-
Aug 9th, 2002, 05:34 PM
#4
Lively Member
i h8 c00kies, but if it doesn't work otherwise
-
Aug 9th, 2002, 08:40 PM
#5
Lively Member
try this one, it worx well for me:
select case Request.QueryString("mode")
case "enter"
response.write="hi"
case else
response.write="bye"
end select
-
Aug 13th, 2002, 10:46 AM
#6
Addicted Member
Ok, seems like you're trying to pass querystring to frames.
There is 2 possibilities :
A) The querystring is in your frameholder, so just create the <frameset...> tag dynamically :
Code:
<FRAMESET rows="80,*" border=0 noresize>
<FRAME NAME="fraTop" SRC="top.asp?MyVar=<%= Request.Querystring("MyVar") %>&MyVar2=<%= Request.Querystring("MyVar2") %>"
scrolling=no marginheight=0 marginwidth=0>
<frame name="fraBot" src="bot_frame.asp" scrolling=no marginheight=0 marginwidth=0>
</FRAMESET>
B) Your querystring is in the top frame. This one is a bit trickier.
Basically, the idea is to get a client script (javascript) on the top frame to refresh the bottom frame with the good page & querystring :
Code:
<script language="javascript">
<% If Request.Querystring("MyVar") = "Allowed" Then %>
parent.frames[1].location = 'allowed.asp?Whatever=whatever';
<% Else %>
parent.frames[1].location = 'notallowed.asp?reason=notfunny';
<% End if %>
</script>
Not sure about the exact syntax of parent.frames[x] part though, I'm at work right now and don't have the code at hand.
Last edited by eL_NiNo; Aug 13th, 2002 at 10:50 AM.
Regards,
El-Nino
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|