How to auto refresh a specific part of a page?

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
mahdokht
Forum Newbie
Posts: 2
Joined: Sun Oct 10, 2010 8:14 am

How to auto refresh a specific part of a page?

Post by mahdokht »

Hi all,
I'm a new programmer in php. I've write a program in HTML, PHP and JavaScript; which reads a file and then fills out some fields of my page. I want to autorefresh these fields without make loading the whole page again;
I was wondering if anybody knows how to do this.
Many thanks in advance for any replies.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How to auto refresh a specific part of a page?

Post by John Cartwright »

Ajax (jquery library comes recommended) + setInterval()


Otherwise, you could do an iframe which contains a meta refresh tag (oldschool way).
mahdokht
Forum Newbie
Posts: 2
Joined: Sun Oct 10, 2010 8:14 am

Re: How to auto refresh a specific part of a page?

Post by mahdokht »

Thank you for your reply, i think that this may not work for me. I have to find the new value of each parameter from a file, so each time i should read this file and renovate parameters. I read the contents of this file in a portion of PHP code and find the value of each parameter. I haven't any other idea of how to do that!!
Post Reply