Hi. I have a Framed page, and in the "main" frame a userchoise is made. In
my "top" frame I have a table containing some status info, the current
logged on user (the username is saved in a SESSION variable) and some
stuff like that. If I in the "main" frame change user (its a drop down
list with choices from a MySQL DB) I would like to reflect that in the
status row in the "top" frame. If I do a "header( Location blablabla )",
that page is shown in the "main" frame, which of course is not desirable...
If I hit the "Refresh" button in Internet Explorer, everything updates
just fine, all the frames get updated and refreshed, including the "top"
frame with the new username showing. How do I do this refresh from withing
my php script that chooses a new user ? I have looked in the php-manual
but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with Apache
2.0.47
Thanx.
/ZoombyWoof 14 5521
"ZoombyWoof" <zo**************@thishotmail.com> wrote in message
news:pa****************************@thishotmail.co m... Hi. I have a Framed page, and in the "main" frame a userchoise is made. In my "top" frame I have a table containing some status info, the current logged on user (the username is saved in a SESSION variable) and some stuff like that. If I in the "main" frame change user (its a drop down list with choices from a MySQL DB) I would like to reflect that in the status row in the "top" frame. If I do a "header( Location blablabla )", that page is shown in the "main" frame, which of course is not
desirable... If I hit the "Refresh" button in Internet Explorer, everything updates just fine, all the frames get updated and refreshed, including the "top" frame with the new username showing. How do I do this refresh from withing my php script that chooses a new user ? I have looked in the php-manual but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with Apache 2.0.47 Thanx.
/ZoombyWoof
Ditch the framesets, they complicate matters.
Regards
Richard Grove http://shopbuilder.org - ecommerce systems
Become a Shop Builder re-seller: http://www.affiliatewindow.com/affil...ls.php?mid=611 http://www.affiliatewindow.com/a.pl?590
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 18/11/2003
On Tue, 25 Nov 2003 09:11:36 +0000, Richard Grove wrote: "ZoombyWoof" <zo**************@thishotmail.com> wrote in message news:pa****************************@thishotmail.co m... Hi. I have a Framed page, and in the "main" frame a userchoise is made. In my "top" frame I have a table containing some status info, the current logged on user (the username is saved in a SESSION variable) and some stuff like that. If I in the "main" frame change user (its a drop down list with choices from a MySQL DB) I would like to reflect that in the status row in the "top" frame. If I do a "header( Location blablabla )", that page is shown in the "main" frame, which of course is not desirable... If I hit the "Refresh" button in Internet Explorer, everything updates just fine, all the frames get updated and refreshed, including the "top" frame with the new username showing. How do I do this refresh from withing my php script that chooses a new user ? I have looked in the php-manual but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with Apache 2.0.47 Thanx.
/ZoombyWoof
Ditch the framesets, they complicate matters.
Regards Richard Grove
Well, I have discovered that yes, but what if I still want my frames ? :-)
It's quite nice to have a left frame so navigation gets easy, then I dont
have to have links to everything on every page...and I want to be able to
at all times see under what username I'm using the application without
having to spell it out on every page...
/ZW
ZoombyWoof wrote: Hi. I have a Framed page, and in the "main" frame a userchoise is made. In my "top" frame I have a table containing some status info, the current logged on user (the username is saved in a SESSION variable) and some stuff like that. If I in the "main" frame change user (its a drop down list with choices from a MySQL DB) I would like to reflect that in the status row in the "top" frame. If I do a "header( Location blablabla )", that page is shown in the "main" frame, which of course is not desirable...
If I hit the "Refresh" button in Internet Explorer, everything updates just fine, all the frames get updated and refreshed, including the "top" frame with the new username showing. How do I do this refresh from withing my php script that chooses a new user ? I have looked in the php-manual but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with Apache 2.0.47 Thanx.
You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs refreshing.
<script language="javascript">
window.parent.top.location.reload();
</script>
Using frames or not is sort-of a holy war. They are badly supported for
some browsers, especially screen readers for blind users etc. I try and
avoid using them for anything other than cosmetic reasons for the public
parts of my websites (convenient sidebar menu etc) in case they aren't
supported but rely on them heavily for web applications. Sometimes the
only way to make a usable app is to use framesets (Windows Explorer,
Outlook, Eudora etc).
On Tue, 25 Nov 2003 10:27:50 +0000, Kevin Thorpe wrote: ZoombyWoof wrote:
Hi. I have a Framed page, and in the "main" frame a userchoise is made. In my "top" frame I have a table containing some status info, the current logged on user (the username is saved in a SESSION variable) and some stuff like that. If I in the "main" frame change user (its a drop down list with choices from a MySQL DB) I would like to reflect that in the status row in the "top" frame. If I do a "header( Location blablabla )", that page is shown in the "main" frame, which of course is not desirable...
If I hit the "Refresh" button in Internet Explorer, everything updates just fine, all the frames get updated and refreshed, including the "top" frame with the new username showing. How do I do this refresh from withing my php script that chooses a new user ? I have looked in the php-manual but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with Apache 2.0.47 Thanx.
You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs refreshing.
<script language="javascript"> window.parent.top.location.reload(); </script>
Using frames or not is sort-of a holy war. They are badly supported for some browsers, especially screen readers for blind users etc. I try and avoid using them for anything other than cosmetic reasons for the public parts of my websites (convenient sidebar menu etc) in case they aren't supported but rely on them heavily for web applications. Sometimes the only way to make a usable app is to use framesets (Windows Explorer, Outlook, Eudora etc).
Thanx a lot. I will try the javascript method as soon as I can, No
vbscript :-)
/ZW
On Tue, 25 Nov 2003 10:27:50 +0000, Kevin Thorpe wrote:
*snip* You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs refreshing.
<script language="javascript"> window.parent.top.location.reload(); </script>
I tried this and then I get into a loop. This does exactly what pushing
the refresh button in IE does (I checked the apache access_log), it also
reloads the main frame where I inserted the java reload command, so it
reloads, and reloads and reloads...:-)
THis is what refresh button in IE and the java script generates :
"GET /zwMD-UTV/ HTTP/1.1" 304 -
"GET /zwMD-UTV/leftFrame.html HTTP/1.1" 304 -
"GET /zwMD-UTV/topFrame.php HTTP/1.1" 200 554
"GET /zwMD-UTV/mainFrame.php HTTP/1.1" 200 442
I know absolutely nothing about javascript, is there some way to point out
the topframe only, so only that frame gets reloaded ? By using the
framename or something ?
I could work around this by using a sessionflag that is cleared after the
javascript is run, and set in the php script that does the uservalidation
and issues a header(Location: mainFrame.php) but it's kind of ugly don't
you think ?
Thanx
/ZW
ZoombyWoof wrote: On Tue, 25 Nov 2003 10:27:50 +0000, Kevin Thorpe wrote: *snip*
You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs refreshing.
<script language="javascript"> window.parent.top.location.reload(); </script>
I tried this and then I get into a loop. This does exactly what pushing the refresh button in IE does (I checked the apache access_log), it also reloads the main frame where I inserted the java reload command, so it reloads, and reloads and reloads...:-)
THis is what refresh button in IE and the java script generates : "GET /zwMD-UTV/ HTTP/1.1" 304 - "GET /zwMD-UTV/leftFrame.html HTTP/1.1" 304 - "GET /zwMD-UTV/topFrame.php HTTP/1.1" 200 554 "GET /zwMD-UTV/mainFrame.php HTTP/1.1" 200 442
I know absolutely nothing about javascript, is there some way to point out the topframe only, so only that frame gets reloaded ? By using the framename or something ? I could work around this by using a sessionflag that is cleared after the javascript is run, and set in the php script that does the uservalidation and issues a header(Location: mainFrame.php) but it's kind of ugly don't you think ?
sorry, I forgot 'top' was a reserved word. It's the outermost window
(your frameset)
<script language="javascript">
window.parent.topFrame.location.reload();
</script>
On Tue, 25 Nov 2003 12:03:50 +0000, Kevin Thorpe wrote: ZoombyWoof wrote:
On Tue, 25 Nov 2003 10:27:50 +0000, Kevin Thorpe wrote: *snip*
You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs refreshing.
<script language="javascript"> window.parent.top.location.reload(); </script>
I tried this and then I get into a loop. This does exactly what pushing the refresh button in IE does (I checked the apache access_log), it also reloads the main frame where I inserted the java reload command, so it reloads, and reloads and reloads...:-)
THis is what refresh button in IE and the java script generates : "GET /zwMD-UTV/ HTTP/1.1" 304 - "GET /zwMD-UTV/leftFrame.html HTTP/1.1" 304 - "GET /zwMD-UTV/topFrame.php HTTP/1.1" 200 554 "GET /zwMD-UTV/mainFrame.php HTTP/1.1" 200 442
I know absolutely nothing about javascript, is there some way to point out the topframe only, so only that frame gets reloaded ? By using the framename or something ? I could work around this by using a sessionflag that is cleared after the javascript is run, and set in the php script that does the uservalidation and issues a header(Location: mainFrame.php) but it's kind of ugly don't you think ? sorry, I forgot 'top' was a reserved word. It's the outermost window (your frameset)
<script language="javascript"> window.parent.topFrame.location.reload(); </script>
Thanx a million :-) Now it works just like I want it :-))
/ZoombyWoof
ZoombyWoof: Well, I have discovered that yes, but what if I still want my frames ? :-) It's quite nice to have a left frame so navigation gets easy, then I dont have to have links to everything on every page...and I want to be able to at all times see under what username I'm using the application without having to spell it out on every page...
You don't need frames to achieve any of those things. Just use PHP. All the
websites I've written in PHP consist of a single page (index.php), which
then selectively includes the rest of the site.
André Næss
On Tue, 25 Nov 2003 13:28:30 +0000, André Næss wrote: ZoombyWoof:
Well, I have discovered that yes, but what if I still want my frames ? :-) It's quite nice to have a left frame so navigation gets easy, then I dont have to have links to everything on every page...and I want to be able to at all times see under what username I'm using the application without having to spell it out on every page...
You don't need frames to achieve any of those things. Just use PHP. All the websites I've written in PHP consist of a single page (index.php), which then selectively includes the rest of the site.
André Næss
You may be right, I'm not experienced enough in PHP or HTML to argue with
you, but why do a lot of people think Frames are a bad thing ? I find it
easy to navigate a site without having to click "Back" or try to find the
link that gets back to a index page or whatever...
This is maybe a religion thing, like C or C++, or Windows or Unix or...
/ZW
ZoombyWoof: You may be right, I'm not experienced enough in PHP or HTML to argue with you, but why do a lot of people think Frames are a bad thing ? I find it easy to navigate a site without having to click "Back" or try to find the link that gets back to a index page or whatever...
Because frames break the fundamental relationship between a URL and a
document. Ever tried to email a link to a framed document to someone?
"Well, uh, you go to this URL: http://www.example.com, and then you click
on 'Images'...". If frames hadn't been used you could just send http://www.example.com/images instead.
If you think frames makes sites easier to navigate, that's just because the
non-frame pages were poorly designed in the first place.
André Næss
André Næss wrote: ZoombyWoof:
Well, I have discovered that yes, but what if I still want my frames ? :-) It's quite nice to have a left frame so navigation gets easy, then I dont have to have links to everything on every page...and I want to be able to at all times see under what username I'm using the application without having to spell it out on every page...
You don't need frames to achieve any of those things. Just use PHP. All the websites I've written in PHP consist of a single page (index.php), which then selectively includes the rest of the site.
Confuses Google badly though doing that. I tend to prefer to let
documents stand on their own. That way I can hand styling and content
changes to the designers instead of doing it all myself.
document.php
<?php include('layout.lib'); ?>
<html>
<head>
<link rel="stylesheet" src="/style.css">
<?php layouthead(); ?>
</head>
<body>
<?php layouttop(); ?>
....
....
<?php layoutbottom(); ?>
</body>
</html>
Where layout.lib contains the three called functions to add div/tables
to frame the document. That way the designer can work on plain pages and
the users get them nicely framed. More importantly I don't have to look
at the crud that DreamWeaver puts in the HTML.
....and finally. I have to do a browser check in layout.lib to avoid
adding the layout content for screen readers, lynx etc. When I used
frames this tended to fix itself as simple browsers didn't honour the
javascript to pop a document into the frameset.
I noticed that Message-ID: <bp**********@maud.ifi.uio.no> from André
Næss contained the following: Because frames break the fundamental relationship between a URL and a document. Ever tried to email a link to a framed document to someone? "Well, uh, you go to this URL: http://www.example.com, and then you click on 'Images'...". If frames hadn't been used you could just send http://www.example.com/images instead.
There are search engine and accessibility issues as well.
--
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/
Kevin Thorpe: André Næss wrote:
ZoombyWoof:
Well, I have discovered that yes, but what if I still want my frames ? :-) It's quite nice to have a left frame so navigation gets easy, then I dont have to have links to everything on every page...and I want to be able to at all times see under what username I'm using the application without having to spell it out on every page...
You don't need frames to achieve any of those things. Just use PHP. All the websites I've written in PHP consist of a single page (index.php), which then selectively includes the rest of the site.
Confuses Google badly though doing that. I tend to prefer to let documents stand on their own. That way I can hand styling and content changes to the designers instead of doing it all myself.
Not really, you can easily access articles as www.example.com/articles/2363
by extracting the variables from the url, and that way you maintain the
URL->Document relationship.
But are you sure Google isn't able to understand stuff like:
index.php?article=23. After all, this is a different URL from
index.php?article=24.
André Næss
"ZoombyWoof" <zo**************@thishotmail.com> wrote in message
news:pa****************************@thishotmail.co m... On Tue, 25 Nov 2003 10:27:50 +0000, Kevin Thorpe wrote:
ZoombyWoof wrote:
Hi. I have a Framed page, and in the "main" frame a userchoise is made.
In my "top" frame I have a table containing some status info, the current logged on user (the username is saved in a SESSION variable) and some stuff like that. If I in the "main" frame change user (its a drop down list with choices from a MySQL DB) I would like to reflect that in the status row in the "top" frame. If I do a "header( Location
blablabla )", that page is shown in the "main" frame, which of course is not
desirable... If I hit the "Refresh" button in Internet Explorer, everything updates just fine, all the frames get updated and refreshed, including the
"top" frame with the new username showing. How do I do this refresh from
withing my php script that chooses a new user ? I have looked in the php-manual but havent been able to find anything about this.
Any help would be very appreciated. I use PHP 4.3 on a RH 9.0 with
Apache 2.0.47 Thanx.
You'll have to resort to javascript (or vbscript <ugh!>) to do this.
In the main frame you can insert the following if 'top' needs
refreshing. <script language="javascript"> window.parent.top.location.reload(); </script>
Using frames or not is sort-of a holy war. They are badly supported for some browsers, especially screen readers for blind users etc. I try and avoid using them for anything other than cosmetic reasons for the public parts of my websites (convenient sidebar menu etc) in case they aren't supported but rely on them heavily for web applications. Sometimes the only way to make a usable app is to use framesets (Windows Explorer, Outlook, Eudora etc).
Thanx a lot. I will try the javascript method as soon as I can, No vbscript :-)
/ZW
Not all users have javascript enabled.
As I said originally, ditch the frameset, it will save you time and effort
whilst providing a better site, not only for users, but for search engines.
If you are worried about providing the same nav on each page, simpley do a
nav.php file and include it in all pages.
include("nav,.php");
Regards
Richard Grove http://shopbuilder.org - ecommerce systems
Become a Shop Builder re-seller: http://www.affiliatewindow.com/affil...ls.php?mid=611 http://www.affiliatewindow.com/a.pl?590
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 18/11/2003 This discussion thread is closed Replies have been disabled for this discussion. Similar topics
9 posts
views
Thread by Mark |
last post: by
|
4 posts
views
Thread by Noel Wood |
last post: by
|
3 posts
views
Thread by Scott |
last post: by
|
5 posts
views
Thread by Steve |
last post: by
|
12 posts
views
Thread by Tarken |
last post: by
|
4 posts
views
Thread by Andrew Alger |
last post: by
|
10 posts
views
Thread by tasmisr |
last post: by
|
1 post
views
Thread by ppatel |
last post: by
|
7 posts
views
Thread by Juan Romero |
last post: by
|
12 posts
views
Thread by martin1 |
last post: by
| | | | | | | | | | |