Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
PHP refreshing

 
Post new topic   Reply to topic Printable version
 View previous topic  FTP Software Post :: Post Anyone have info on WinTV cards?  View next topic  
Author Message
Contempt@lazy
Guest


Offline

PostPosted: Mon Mar 13, 2006 11:16 am   Post maybe stupid    Post subject: PHP refreshing Reply to topic Reply with quote

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

PostPosted: Mon Mar 13, 2006 1:04 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Mon Mar 13, 2006 1:05 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Tue Mar 14, 2006 10:50 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Tue Mar 14, 2006 11:02 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Wed Mar 15, 2006 9:12 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Yea i've always used META to refresh my pages.
:)
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Thu Mar 16, 2006 8:18 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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'];
?>
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Thu Mar 16, 2006 9:35 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Fri Mar 17, 2006 5:48 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Mar 17, 2006 8:21 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Fri Mar 17, 2006 10:34 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 37 page(s) served in previous 5 minutes.

phpBB Created this page in 0.588023 seconds : 35 queries executed (84.5%): GZIP compression disabled