468,107 Members | 1,343 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Frames and Browser Reload Question

Hi,

I have an application where I use a left frame to navigate to another page
in the main frame. After I've done this, when I use "RELOAD" in the
browser, it goes back to the original page rather than the one I've
navigated to.

If you go to this page:

http://fboprimedevel.e3ft.com

Then choose "Flight Schedule" on the left navigation pane, then use RELOAD
in the browser, it goes back to the original page.

How do I change this?

Thanks, Dave Ashley

Apr 9 '06 #1
5 1569
David T. Ashley:
I have an application where I use a left frame to navigate to another page
in the main frame. After I've done this, when I use "RELOAD" in the
browser, it goes back to the original page rather than the one I've
navigated to.

How do I change this?


This is a concomitant of frames. Not much you can do, short of
giving each page in the main frame its own frameset (i.e., every
combination of left page and main page has a distinct URL).

If 'RELOAD' reloads the current URL and the current URL points to a
frameset, then it is the frameset that will be reloaded.

Comp.infosystems.www.authoring.site-design.

--
Jock

Apr 9 '06 #2
The best advice is probably not to use frames - there are more problems
with them (i.e. accessibility - browse through framed page with cell
phone is a nightmare).

If you must use them, try using cookies or sessions. Every page in main
frame saves its name to the session or cookie. Main page (the one with
<frameset> and <frame> tags) will read this information and write the
appropriate src attribute of main frame.
David T. Ashley wrote:
Hi,

I have an application where I use a left frame to navigate to another page
in the main frame. After I've done this, when I use "RELOAD" in the
browser, it goes back to the original page rather than the one I've
navigated to.

If you go to this page:

http://fboprimedevel.e3ft.com

Then choose "Flight Schedule" on the left navigation pane, then use RELOAD
in the browser, it goes back to the original page.

How do I change this?

Thanks, Dave Ashley

Apr 9 '06 #3
"Jiri Fogl" <xf******@stud.fit.vutbr.cz> wrote in message
news:e1**********@boco.fee.vutbr.cz...
The best advice is probably not to use frames - there are more problems
with them (i.e. accessibility - browse through framed page with cell phone
is a nightmare).

If you must use them, try using cookies or sessions. Every page in main
frame saves its name to the session or cookie. Main page (the one with
<frameset> and <frame> tags) will read this information and write the
appropriate src attribute of main frame.


In a logical sense, I agree with you ... the behavior of the browser is not
guaranteed and it should reload the frameset.

The mystery to me is why Internet Explorer is apparently able to make such
good guesses most of the time.

For example, if you go to this web site:

http://www.metzgersaircraft.com/

and try the links on the left navigation bar (with Internet Explorer), then
use reload, you'll notice that it reloads the main frame as expected. I
know for sure that this site does not use cookies for frame status (I helped
them set it up). I can cite other sites with frames that behave the same
way with IE. (For example, http://webtools.e3ft.com/ and try the "htpasswd
generation" and then reload.)

So, IE is using cues that I'm not understanding to take a good guess ... but
it doesn't work on the development site I'm playing with. The question is
why.

Thank you for the suggestion about the cookies. That will definitely do the
trick if I can't figure out why IE works the way it does (and it is probably
better as it would work on other browsers, too). That suggestion will
definitely cure my problem. But the mystery remains ...

Thanks, Dave

Apr 9 '06 #4
Just a thought, seeing as you're using php anyway, why not just forget
about frames and use an html table for your index instead, something
like this...

echo "<head>\n";
//get ready to load the selected page
if (isset($_GET['page']))

{
$page = $_GET['page'];
$suffix = '.php';
$ps = $page.$suffix;
}
else
{
$ps = 'home.php';
}
$page = ucwords($page);
echo "<html>\n";
echo "<head>\n";
echo "<title>Welcome to My $page Page</title>\n";

echo "</head>\n";

Your table might look something like this...

echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=home'>Home</a></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=news'>News</a></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=projects'>Projects</a></td>\n";
echo "</tr>\n";

and a table within one of these pages (in this case the Projects page)
might look something like this...

echo "<th><a title='Sort by this column'
href='$PHP_SELF?key=project_no'>Project No</a></th>\n";

HTH

Apr 12 '06 #5
strawberry wrote:
Just a thought, seeing as you're using php anyway, why not just forget
about frames and use an html table for your index instead, something
like this...

echo "<head>\n";
//get ready to load the selected page
if (isset($_GET['page']))

{
$page = $_GET['page'];
$suffix = '.php';
$ps = $page.$suffix;
}
else
{
$ps = 'home.php';
}
$page = ucwords($page);
echo "<html>\n";
echo "<head>\n";
echo "<title>Welcome to My $page Page</title>\n";

echo "</head>\n";

Your table might look something like this...

echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=home'>Home</a></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=news'>News</a></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td><a href='$PHP_SELF?page=projects'>Projects</a></td>\n";
echo "</tr>\n";

and a table within one of these pages (in this case the Projects page)
might look something like this...

echo "<th><a title='Sort by this column'
href='$PHP_SELF?key=project_no'>Project No</a></th>\n";

HTH


Or even better than tables, use CSS.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 12 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

40 posts views Thread by JohnnyCJohnny | last post: by
20 posts views Thread by Tammy | last post: by
20 posts views Thread by M.Siler | last post: by
5 posts views Thread by Ben | last post: by
5 posts views Thread by sudidelaravi | last post: by
7 posts views Thread by rjames.clarke | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.