Author |
Message |
Contempt@lazy Guest
Offline
|
Posted: Mon Mar 13, 2006 11:16 am Post maybe stupid 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. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Mon Mar 13, 2006 1:04 pm Post maybe stupid 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. |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Mon Mar 13, 2006 1:05 pm Post maybe stupid 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. _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
Contempt+ Server Help Squatter
Age:36 Gender: Joined: May 15 2005 Posts: 682 Location: Home Offline
|
Posted: Tue Mar 14, 2006 10:50 pm Post maybe stupid 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? _________________ SSE Network Administrator |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Tue Mar 14, 2006 11:02 pm Post maybe stupid 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? |
|
Back to top |
|
 |
BDwinsAlt Agurus's Posse

Age:34 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Wed Mar 15, 2006 9:12 am Post maybe stupid Post subject: |
 |
|
|
|
Yea i've always used META to refresh my pages.
:) |
|
Back to top |
|
 |
Donkano Server Help Squatter
Gender: Joined: Jul 02 2003 Posts: 763 Offline
|
Posted: Thu Mar 16, 2006 8:18 pm Post maybe stupid Post subject: |
 |
|
|
|
Meta tags are the worst. Users can disable them, use the following code:
<?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:
<?php
$Current_Page = $_SERVER['PHP_SELF'];
?> |
|
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Thu Mar 16, 2006 9:35 pm Post maybe stupid 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. |
|
Back to top |
|
 |
Donkano Server Help Squatter
Gender: Joined: Jul 02 2003 Posts: 763 Offline
|
Posted: Fri Mar 17, 2006 5:48 pm Post maybe stupid 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. |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Fri Mar 17, 2006 8:21 pm Post maybe stupid 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? |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Mar 17, 2006 10:34 pm Post maybe stupid Post subject: |
 |
|
|
|
Disabling meta tags? WTF are you talking about, Donkano?
Use the meta tag. This situation is what this one was created for. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
|