Server Help

Trash Talk - PHP refreshing

Anonymous - Mon Mar 13, 2006 11:16 am
Post subject: PHP refreshing
Hey, I was wondering if anyone knows how to refresh a page and how to refresh a table, if that is possible. I know this is very little information, but I'm at school, and I'm not really supposed to be doing this. So if you have questions, please ask. Thanks.
Smong - Mon Mar 13, 2006 1:04 pm
Post subject:
Refresh a page/table? As in making the user click the refresh button?

To change just part of the page you can enclose the table in a named tag and then use javascript to change the innerHTML property.
CypherJF - Mon Mar 13, 2006 1:05 pm
Post subject:
You can use META tags to refresh a page; Javascript to refresh the page; or using Javascript + XML = AJAX to make a dynamically updated page without refreshing.
Contempt+ - Tue Mar 14, 2006 10:50 pm
Post subject:
Sorry this is a late reply.

I had a short post because my teacher started to keep a close eye on me.

What I meant to say was to have the page automatically refresh either itself, or a table. So basically what Cypher said. Any ideas other than using javascript of AJAX?
CypherJF - Tue Mar 14, 2006 11:02 pm
Post subject:
HTML is static without help of DOM (utilizing javascript); so if you don't want to go w/ javascript, meta tag for refreshing is the only shot?
BDwinsAlt - Wed Mar 15, 2006 9:12 am
Post subject:
Yea i've always used META to refresh my pages.
:)
Donkano - Thu Mar 16, 2006 8:18 pm
Post subject:
Meta tags are the worst. Users can disable them, use the following code:
Code: Show/Hide
<?php
header("location: <Input URL Location Here>");
exit();
?>

Make sure the script ends or there can be data loss if the user is sent with any form of data.


Edit:
To get the currently viewed page, use:
Code: Show/Hide
<?php
$Current_Page = $_SERVER['PHP_SELF'];
?>

CypherJF - Thu Mar 16, 2006 9:35 pm
Post subject:
Location only forwards the browser to the new URL but doesn't really solve the issue of "refreshing" the new page on a specific time interval, which is what I assumed is what he wants.
Donkano - Fri Mar 17, 2006 5:48 pm
Post subject:
If it is a set timer, I would reccommend using JavaScript. There is less people who disable JavaScript than there are people who disable meta tags.
CypherJF - Fri Mar 17, 2006 8:21 pm
Post subject:
I wouldn't use Javascript; I'm using a JS timer, it appears that Firefox keeps the JS timer in memory (in cache) running and doesn't restart it. :/ So when they visit the page by hitting back or w/e, the timer has thrown/activated accordingly. Has anyone else had this issue?
Cyan~Fire - Fri Mar 17, 2006 10:34 pm
Post subject:
Disabling meta tags? WTF are you talking about, Donkano?

Use the meta tag. This situation is what this one was created for.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group