The ext framework will allow you to update an element or object periodically using just a few lines of code by calling the page specified in the startAutoRefresh property. The component is called the Updater and the API documentation can be found here ( http://dev.sencha.com/deploy/dev/docs/?class=Ext.Updater ).This is great if you need to call a page that will update something that is happening in real time, like, stock quotes, sports scores, or rss feeds for example. The code below passes the userID to the myPortfolio.php page every 10 seconds resulting in near real time price updates for all of the users stock picks.
var myPortfolioTab = new Ext.Panel({
autoLoad: {url: 'myPortfolio.php', params: {'userID':uid},discardUrl: true },
title: 'My Stock Ticker',
closable:false,
autoScroll:true
});
myPortfolioTab.on('render', function() {
myPortfolioTab.getUpdater().startAutoRefresh(10, 'myPortfolio.php', {'userID': }, updateParam );
});
Pingback: Best Stock Picks For 2011