ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 28th, 2003, 07:50 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Jul 2003
Location: I used to live at home, now I stay at the house
Posts: 9,890 ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)ChiefWigs1982 User rank is Major General (70000 - 90000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 3 Months 2 Weeks 5 Days 13 h 45 m 3 sec
Reputation Power: 807
Facebook
QueryString Problems

Hello!
I've made a website in asp. It has two frames, a menu and the main page. I have a variable in the menu page that is supposed to store the content of the QueryString from the address bar when the page is loaded. It doesn't work though!

Is it actually possible for this to work, or am I just wasting my time with it?!

Thanks for your help!
__________________
Support requests via PM will be ignored!
Sites: Route of Queue | Sinthetic - Alternative UK Hiphop
Read These: The General Rules Thread | The General FAQ Thread | NEW USERS - How to post a question

Sign up with Matched.co.uk and earn up to £15 per website every month!


Reply With Quote
  #2  
Old July 28th, 2003, 09:40 AM
don_sparko's Avatar
don_sparko don_sparko is offline
Digitally Challenged
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 280 don_sparko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 54 m 14 sec
Reputation Power: 6
try setting the variable in the frame, i think with frames it acts as 2 different pages so you have to set it in the frame you are using it in. also you could try accessing it through the doc. obj. model, but i'm not sure if that would work.

Reply With Quote
  #3  
Old July 29th, 2003, 07:07 AM
SiPeaPod SiPeaPod is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Watford, England
Posts: 6 SiPeaPod User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You could try passing the value through to the menu page in the URL like this:

Frameset
Code:
<% @Language=VBScript %>
<% Option Explicit %>

<html>
<head><title>Test Frameset A</title></head>

<%
Dim sValue

sValue = CStr(Request.QueryString("Value"))
%>

<frameset cols="215, *">
	<frame name="menu" frameborder="0" marginheight="10" marginwidth="10" noresize src="../asp/a_menu.asp?Value=<%=sValue%>">
	<frame name="main" frameborder="0" marginheight="10" marginwidth="10" noresize src="../asp/a_main.asp">
</frameset>

</html>


Menu
Code:
<% @language="VBScript" %>
<% Option Explicit %>

<html>
<head><title>Test Menu A</title></head>

<body bgcolor="#ffe0c0">
<basefont face="Arial Narrow, Arial, sans-serif">

<h2>This is the menu</h2>

<%
Dim sValue

sValue = Request.QueryString("Value")

Response.Write "Variable value is: " & sValue & "<br>"
%>

</body>
</html>


Main Page
Code:
<% @Language=VBScript %>
<% Option Explicit %>

<html>
<head><title>Test Main A</title></head>

<body bgcolor="#ffe0c0">
<basefont face="Arial Narrow, Arial, sans-serif">

<h2>This is the main page</h2>

</body>
</html>


or you could use a session variable like this:

Frameset
Code:
<% @Language=VBScript %>
<% Option Explicit %>

<html>
<head><title>Test Frameset B</title></head>

<%
Session("Value") = CStr(Request.QueryString("Value"))
%>

<frameset cols="215, *">
	<frame name="menu" frameborder="0" marginheight="10" marginwidth="10" noresize src="../asp/b_menu.asp">
	<frame name="main" frameborder="0" marginheight="10" marginwidth="10" noresize src="../asp/b_main.asp">
</frameset>

</html>


Menu
Code:
<% @language="VBScript" %>
<% Option Explicit %>

<html>
<head><title>Test Menu</title></head>

<body bgcolor="#ffe0c0">
<basefont face="Arial Narrow, Arial, sans-serif">

<h2>This is the menu</h2>

<%
Response.Write "Variable value is: " & Session("Value") & "<br>"
%>

</body>
</html>


Main Page
Code:
<% @Language=VBScript %>
<% Option Explicit %>

<html>
<head><title>Test Main B</title></head>

<body bgcolor="#ffe0c0">
<basefont face="Arial Narrow, Arial, sans-serif">

<h2>This is the main page</h2>

</body>
</html>


Hope this helps!

Simon.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > QueryString Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway