PDA

View Full Version : Ajax refresh



bad-dj
04-04-2007, 10:25 PM
HI there how do i make a Ajax refresh as i am not good at Ajax i want a page to reload like in a <div> or some thing thank you.

Jarred
18-04-2007, 02:30 PM
hay i found this on the prototype (http://prototypejs.org/learn/introduction-to-ajax) website

Automate requests with the Ajax.PeriodicalUpdater

You find the Ajax.Updater cool, but want to run it in periodical intervals to repeatedly fetch content from the server? Prototype framework has that, too - it's called Ajax.PeriodicalUpdater (http://prototypejs.org/api/ajax/periodicalupdater), and basically it's running Ajax.Updater at regular intervals.

new Ajax.PeriodicalUpdater('products', '/some_url',
{
method: 'get',
insertion: Insertion.Top,
frequency: 1,
decay: 2
});
Hope this helps ya, im trying to do the same thing too, so hopefully i could help you. By the way for that to work u need to download the prototype script (its javascript) Download. (http://prototypejs.org/assets/2007/1/18/prototype.js)
Anyway Good luck :D

Want to hide these adverts? Register an account for free!