How to uopdates content automatically wothout reload a page?
Yuki - October 2, 2009 - 09:58
How to uopdates content automatically wothout reload a page?
example: http://news.bbc.co.uk/sport2/hi/olympic_games/8283061.stm
How to uopdates content automatically wothout reload a page?
example: http://news.bbc.co.uk/sport2/hi/olympic_games/8283061.stm
Re: How to uopdates content automatically wothout reload a page?
As you have probably guessed already, this involves Javascript's Ajax functionality. This particular page of BBC is using the JSONP method (http://en.wikipedia.org/wiki/JSONP#JSONP) for content update. In Drupal, you can do so with jQuery's getJSON() method (http://docs.jquery.com/Ajax/jQuery.getJSON). The Views datasource module (http://drupal.org/project/views_datasource) can provide node content using JSONP.
The easiest way to set up such a page will be to drop some Javascript code as page content. This code will periodically call the webserver for updates.
If this sounds too technical then don't hesitate to ask more.
Would love to get the step by step process to setup
Would love to get the step by step process to setup a page with this technique...
You might want to have a look
You might want to have a look at http://drupal.org/node/255745 and the accompanying code at http://dunkelfuerst.com/projekte/drupal-block-refresh-6x . This project allows you to setup any block to have an AJAX (without page reload) refresh of the page. It also provides a decent starting point if you wanted to expand it to function with other displays.