Page 1 of 1

Better way to refresh a calendar

Posted: Mon Aug 31, 2009 12:32 pm
by damian
Hi guys,
I've created a calendar here:

http://snow.byethost8.com/service/

I'm new to php but found the basic code for the calendar and modified it.

I'm just wondering if anyone can give me some advice regarding refreshing the dates when the user presses the previous month/next month links ('<' and '>').
I have it refreshing the entire page at the moment, which works but I was wondering if there is a better way? Some way I can just refresh the table that the calendar sits in?
Is php the way to go or would I be better doing some javascript?

Thanks for your help!

Re: Better way to refresh a calendar

Posted: Mon Aug 31, 2009 12:57 pm
by superdezign
PHP cannot alter a page after it has already been loaded. JavaScript would be what you want.

Re: Better way to refresh a calendar

Posted: Mon Aug 31, 2009 1:50 pm
by califdon
Specifically, you want to refresh data on the page without reloading the entire page--that's called AJAX (Asynchronous Javascript And XML), which is a combination of Javascript in the browser and PHP (or other server script) at the server. Google for AJAX.