How to refresh?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yagnbda
Forum Newbie
Posts: 8
Joined: Wed Oct 13, 2004 5:10 am

How to refresh?

Post by yagnbda »

Hi,
I have a problem in php coding.
I want to refresh a single data sell of a table, how it should be?

i.e supose there is a Table named T1 and have 5 data sells(TD1...TD5), i want to refresh contents of TD5 only, how?

i will be thank ful to you.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

You cant really unless you use some clever javascript that loads values into the atble via the use of some hidden frame that would refresh to get the required data.

It would be a lot easier to just reload the page.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

PHP = serverside, JavaScript = clientside

What you want to do is on the clientside (as kettle_drum noted), you cannot do this with PHP.

Mac
yagnbda
Forum Newbie
Posts: 8
Joined: Wed Oct 13, 2004 5:10 am

Post by yagnbda »

actuly i am working on a website which is almost realtime so i cant afford to give more time in refreshing the whole page:
one thing which i think is possible but i dont know more about it. is threading possible in php?
if so we can do it with ease by embading javascript in it.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

use a hidden <iframe> on your page and use that to retrieve data and set the main page.
things like innerHTML will be used.

if you need an example I can provide it or if you want to figure it out yourself check out info on iframes.
Post Reply