473,382 Members | 1,290 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,382 software developers and data experts.

Refresh problem

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
Jul 17 '05 #1
14 5585
"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
Jul 17 '05 #2
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
Jul 17 '05 #3
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).
Jul 17 '05 #4
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

Jul 17 '05 #5
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

Jul 17 '05 #6
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>
Jul 17 '05 #7
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

Jul 17 '05 #8
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
Jul 17 '05 #9
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

Jul 17 '05 #10
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
Jul 17 '05 #11
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.

Jul 17 '05 #12
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/
Jul 17 '05 #13
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
Jul 17 '05 #14
"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
Jul 17 '05 #15

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

Similar topics

9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
4
by: Noel Wood | last post by:
Hello, I have a problem that I'm sure is simple but I have searched the newsgroup and have not found it posted before so I apologize if it has been asked heaps of times before. I have a page that...
3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
5
by: Steve | last post by:
Hi, I have a private website for 20 people that is similar to a web email client like hotmail. There are two frames, one on the left with links for "New", "History", "Todays" and a frame on the...
12
by: Tarken | last post by:
Hi, I am trying to do some refactoring of a web site to ensure that it displays in the most web clients possible. One of the pages requires to be redirected to another automatically, for one...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
1
by: ppatel | last post by:
Problem I have a problem with web image button control click event. The click event does not get trigger until it has not been clicked once or page refresh occures(which is fine). When click...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.