473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Passing a variable to a frameset

Hi There,
I have a page that has links with some variables and I need to open the
results set in a frameset. I have tried doing this in various different
ways, but still cannot get the variable passed to the relevant frames within
the frameset.

What is the best way of getting this done.
Thanks
Hans
Jul 17 '05 #1
8 3521
Hans wrote:
Hi There,
I have a page that has links with some variables and I need to open the
results set in a frameset. I have tried doing this in various different
ways, but still cannot get the variable passed to the relevant frames within
the frameset.

What is the best way of getting this done.
Thanks
Hans


I don't know if this is the "best" way, but why not use "get"?

--------------------
frame A
--------------------
frame B


--------------------

if there was a variable in a script in frame a, then you could print the
var like this:
<a href="someFile.php?var1=<?= $var1 ?>" target="frame b">Link</a>

Then, in frame B, you could do something like this:

$variable = $_GET["var1"];

HTH,

Jon

Jul 17 '05 #2
Jon,
Thanks, I did try this. Maybe I don't understand the problem. I have a non
frames page list.php, there are links that are generated from a record set
like:

<a href="city.php?City=<?php echo $row_RsCities['PlaceName']; ?>"
class="citynav"><?php echo $row_RsCities['PlaceName']; ?></a>

It works fine to a single page, but I now need to use a new frameset for the
city.php page.

If I have a frameset called city_frameset.php and then within that frameset
there is city.php I don't get the variable passed to the city.php page. I
also need this variable for other frames in the page as the city.php frame
will have related information to the city and the main frame page (the
centre portion) will carry other related information. The city.php page has
more links derived from a record set and the links used will then change the
main frame (centre) portion of the frameset.
Using the GET function gives me an error that the variable is not defined.
This tells me that the frameset is not getting the variable to the page in
question (city.php).

Any help would be appreciated
Hans

"Jon Trelfa" <tr******@NOSPAM.nobleaccord.com> wrote in message
news:xc********************@comcast.com...
Hans wrote:
Hi There,
I have a page that has links with some variables and I need to open the
results set in a frameset. I have tried doing this in various different
ways, but still cannot get the variable passed to the relevant frames within the frameset.

What is the best way of getting this done.
Thanks
Hans


I don't know if this is the "best" way, but why not use "get"?

--------------------
frame A
--------------------
frame B


--------------------

if there was a variable in a script in frame a, then you could print the
var like this:
<a href="someFile.php?var1=<?= $var1 ?>" target="frame b">Link</a>

Then, in frame B, you could do something like this:

$variable = $_GET["var1"];

HTH,

Jon

Jul 17 '05 #3
Seems like Jon's method should work... but have you tried cookies or
creating a session even? never used either with frames, but I image it would
do the trick.

Adam

"Hans" <hj*******@yahoo.com> wrote in message
news:c0**********@ctb-nnrp2.saix.net...
Jon,
Thanks, I did try this. Maybe I don't understand the problem. I have a non
frames page list.php, there are links that are generated from a record set like:

<a href="city.php?City=<?php echo $row_RsCities['PlaceName']; ?>"
class="citynav"><?php echo $row_RsCities['PlaceName']; ?></a>

It works fine to a single page, but I now need to use a new frameset for the city.php page.

If I have a frameset called city_frameset.php and then within that frameset there is city.php I don't get the variable passed to the city.php page. I
also need this variable for other frames in the page as the city.php frame
will have related information to the city and the main frame page (the
centre portion) will carry other related information. The city.php page has more links derived from a record set and the links used will then change the main frame (centre) portion of the frameset.
Using the GET function gives me an error that the variable is not defined.
This tells me that the frameset is not getting the variable to the page in
question (city.php).

Any help would be appreciated
Hans

"Jon Trelfa" <tr******@NOSPAM.nobleaccord.com> wrote in message
news:xc********************@comcast.com...
Hans wrote:
Hi There,
I have a page that has links with some variables and I need to open the results set in a frameset. I have tried doing this in various different ways, but still cannot get the variable passed to the relevant frames within the frameset.

What is the best way of getting this done.
Thanks
Hans


I don't know if this is the "best" way, but why not use "get"?

--------------------
frame A
--------------------
frame B


--------------------

if there was a variable in a script in frame a, then you could print the
var like this:
<a href="someFile.php?var1=<?= $var1 ?>" target="frame b">Link</a>

Then, in frame B, you could do something like this:

$variable = $_GET["var1"];

HTH,

Jon


Jul 17 '05 #4
Hi Adam,
I have tried a session, but with no luck. Maybe I am not setting the session
correctly. My code looks like this:

<?php
session_start();
if (isset($HTTP_GET_VARS['City'])) {$City = $HTTP_GET_VARS['City'];
session_register("City");
}
?>

Thanks
Hans

"ShipiboConibo" <shipiboconibo@[no_spam}yahoo.com> wrote in message
news:0JgYb.93$nI1.81@okepread05...
Seems like Jon's method should work... but have you tried cookies or
creating a session even? never used either with frames, but I image it would do the trick.

Adam

"Hans" <hj*******@yahoo.com> wrote in message
news:c0**********@ctb-nnrp2.saix.net...
Jon,
Thanks, I did try this. Maybe I don't understand the problem. I have a non
frames page list.php, there are links that are generated from a record

set
like:

<a href="city.php?City=<?php echo $row_RsCities['PlaceName']; ?>"
class="citynav"><?php echo $row_RsCities['PlaceName']; ?></a>

It works fine to a single page, but I now need to use a new frameset for

the
city.php page.

If I have a frameset called city_frameset.php and then within that

frameset
there is city.php I don't get the variable passed to the city.php page. I also need this variable for other frames in the page as the city.php frame will have related information to the city and the main frame page (the
centre portion) will carry other related information. The city.php page

has
more links derived from a record set and the links used will then change

the
main frame (centre) portion of the frameset.
Using the GET function gives me an error that the variable is not defined. This tells me that the frameset is not getting the variable to the page in question (city.php).

Any help would be appreciated
Hans

"Jon Trelfa" <tr******@NOSPAM.nobleaccord.com> wrote in message
news:xc********************@comcast.com...
Hans wrote:

> Hi There,
> I have a page that has links with some variables and I need to open the > results set in a frameset. I have tried doing this in various different > ways, but still cannot get the variable passed to the relevant frames within
> the frameset.
>
> What is the best way of getting this done.
> Thanks
> Hans
>
>

I don't know if this is the "best" way, but why not use "get"?

--------------------
frame A
--------------------
frame B


--------------------

if there was a variable in a script in frame a, then you could print

the var like this:
<a href="someFile.php?var1=<?= $var1 ?>" target="frame b">Link</a>

Then, in frame B, you could do something like this:

$variable = $_GET["var1"];

HTH,

Jon



Jul 17 '05 #5
maybe here is some misunderstanding?

<frameset>
<frame name=a
src=link_page?city=<?=urlencode($city)?>&topic=<?= urlencode($topic)?>>
<frame name=b src=map_page?city=<?=urlencode($city)?>>
</frameset>

sorry, such a long time i've worked with html frames,
but all in all this look to me the right way to pass some vars
to frames - which are another pagerequests in themselves

Jul 17 '05 #6
I noticed that Message-ID: <c0*********@ctb-nnrp2.saix.net> from Hans
contained the following:
Hi There,
I have a page that has links with some variables and I need to open the
results set in a frameset. I have tried doing this in various different
ways, but still cannot get the variable passed to the relevant frames within
the frameset.

What is the best way of getting this done.


Try this (I've only used underscores to stop the line breaking)
http://www.ckdog.co.uk/php/temp/fram...n=South_Africa

The frameset looks like this:
<frameset rows="205,*" frameborder="NO" border="0" framespacing="0"
cols="*">
<frame name="topFrame" scrolling="AUTO" src="top.php<?php print
"?name=".$_GET['name']; ?>" frameborder="YES" >
<frameset cols="388,*" frameborder="NO" border="0" framespacing="0"
rows="*">
<frame name="leftFrame" scrolling="AUTO" src="left.php<?php print
"?age=".$_GET['age']; ?>" frameborder="YES">
<frame name="mainFrame" src="right.php<?php print
"?location=".$_GET['location']; ?>" frameborder="YES" scrolling="AUTO">
</frameset>
</frameset>

and the individual frames simply contain

Top frame
Your name is <?php print $_GET['name']; ?>

Left frame
Your age is <?php print $_GET['age']; ?>

Right frame
Your location is <?php print $_GET['name']; ?>
If this doesn't work, check the version of your PHP is greater than
4.1.0
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #7
Why would you use session for this ? nonsense. Hans method is what should be
used.

<frameset cols="205,*">
<frame name="leftFrame" src="city_frame.php">
<frame name="rightFrame" src="city.php">
</frameset>
city_frame.php
-----------------------------------------
<a href="city.php?city=Montreal" target="rightFrame">Montreal</a>
<a href="city.php?city=NY" target="rightFrame">NY</a>
<a href="city.php?city=Africa" target="rightFrame">Africa</a>

city.php
-----------------------------------------
echo $_GET["city"];

Even with more frames, the concept is the same... Good luck.

Savut

"ShipiboConibo" <shipiboconibo@[no_spam}yahoo.com> wrote in message
news:0JgYb.93$nI1.81@okepread05...
Seems like Jon's method should work... but have you tried cookies or
creating a session even? never used either with frames, but I image it would do the trick.

Adam

"Hans" <hj*******@yahoo.com> wrote in message
news:c0**********@ctb-nnrp2.saix.net...
Jon,
Thanks, I did try this. Maybe I don't understand the problem. I have a non
frames page list.php, there are links that are generated from a record

set
like:

<a href="city.php?City=<?php echo $row_RsCities['PlaceName']; ?>"
class="citynav"><?php echo $row_RsCities['PlaceName']; ?></a>

It works fine to a single page, but I now need to use a new frameset for

the
city.php page.

If I have a frameset called city_frameset.php and then within that

frameset
there is city.php I don't get the variable passed to the city.php page. I also need this variable for other frames in the page as the city.php frame will have related information to the city and the main frame page (the
centre portion) will carry other related information. The city.php page

has
more links derived from a record set and the links used will then change

the
main frame (centre) portion of the frameset.
Using the GET function gives me an error that the variable is not defined. This tells me that the frameset is not getting the variable to the page in question (city.php).

Any help would be appreciated
Hans

"Jon Trelfa" <tr******@NOSPAM.nobleaccord.com> wrote in message
news:xc********************@comcast.com...
Hans wrote:

> Hi There,
> I have a page that has links with some variables and I need to open the > results set in a frameset. I have tried doing this in various different > ways, but still cannot get the variable passed to the relevant frames within
> the frameset.
>
> What is the best way of getting this done.
> Thanks
> Hans
>
>

I don't know if this is the "best" way, but why not use "get"?

--------------------
frame A
--------------------
frame B


--------------------

if there was a variable in a script in frame a, then you could print

the var like this:
<a href="someFile.php?var1=<?= $var1 ?>" target="frame b">Link</a>

Then, in frame B, you could do something like this:

$variable = $_GET["var1"];

HTH,

Jon




Jul 17 '05 #8
Hi All,
Thanks for all the help.

I did find a solution to the problem by simply adding the City parameter to
the frameset like this:

<frame src="topframe.php?City=<?php echo $_GET['City']; ?>" name="topFrame"
scrolling="NO" noresize >
<frameset rows="*" cols="239,*" framespacing="0" frameborder="NO"
border="0">
<frame src="list.php?City=<?php echo $_GET['City']; ?>" name="leftFrame"
scrolling="yes" noresize>
<frame src="main_frame.php?City=<?php echo $_GET['City']; ?>"
name="mainFrame">

Thanks again

Hans

"Geoff Berrow" <bl******@ckdog.co.uk> wrote in message
news:fv********************************@4ax.com...
I noticed that Message-ID: <c0*********@ctb-nnrp2.saix.net> from Hans
contained the following:
Hi There,
I have a page that has links with some variables and I need to open the
results set in a frameset. I have tried doing this in various different
ways, but still cannot get the variable passed to the relevant frames withinthe frameset.

What is the best way of getting this done.
Try this (I've only used underscores to stop the line breaking)

http://www.ckdog.co.uk/php/temp/fram..._telling&locat
ion=South_Africa
The frameset looks like this:
<frameset rows="205,*" frameborder="NO" border="0" framespacing="0"
cols="*">
<frame name="topFrame" scrolling="AUTO" src="top.php<?php print
"?name=".$_GET['name']; ?>" frameborder="YES" >
<frameset cols="388,*" frameborder="NO" border="0" framespacing="0"
rows="*">
<frame name="leftFrame" scrolling="AUTO" src="left.php<?php print
"?age=".$_GET['age']; ?>" frameborder="YES">
<frame name="mainFrame" src="right.php<?php print
"?location=".$_GET['location']; ?>" frameborder="YES" scrolling="AUTO">
</frameset>
</frameset>

and the individual frames simply contain

Top frame
Your name is <?php print $_GET['name']; ?>

Left frame
Your age is <?php print $_GET['age']; ?>

Right frame
Your location is <?php print $_GET['name']; ?>
If this doesn't work, check the version of your PHP is greater than
4.1.0
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

Jul 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: divya | last post by:
This is the problem I am having: I have an index page where I obtain input from the user (for example their date of birth). This information is passed to Page2. Page2 has frames. Outside of the...
4
by: A Web Master | last post by:
I want to know the best way of passing on variable contents on a site coded in ASP using frameset/frame. Content is used in all frames for stuffs like screen_resolution, language, ... My...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
1
by: spiff | last post by:
I am very very new to jscript. What I want to do is set a variable in one frame of a page, and then reload another frame so that it uses the new variable. Is this possible? I want to have a...
6
by: FayeC | last post by:
Here's a question for you: I have a site using a PHP CMS and I need it to use an ASP module from another site but I would like to use a frame so it looks like it is still in the same site. I need...
1
by: | last post by:
Hi, 1st, I did a search and could not find any info on this, the Google results were good, but I'm still have issues...So any help will be great. I have a frame page, which contains 3 frames...
11
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got...
0
by: David Cho | last post by:
Here is the situtation. I am in a page called "thispage.aspx" From there, I would like to go to frameset.htm. In the frameset are two frames - "nextpage.aspx" - "anotherpage.htm" From...
25
by: Geoff Cox | last post by:
Hello, The following <frame src="topbar-frameset.php?newVar=<?php echo $groups; ?>"> passes the value of the variable $groups from a php file to the top page in a frameset but how do I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.