Page 1 of 1

How to auto refresh a specific part of a page?

Posted: Sun Oct 10, 2010 8:23 am
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.

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

Posted: Sun Oct 10, 2010 9:58 am
by John Cartwright
Ajax (jquery library comes recommended) + setInterval()


Otherwise, you could do an iframe which contains a meta refresh tag (oldschool way).

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

Posted: Wed Oct 13, 2010 1:06 am
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!!