david wrote: > Hi Bill, > > Isn't it just an Ajax.Request that you need, because the periodical > executer is used 'generally' without the need of a user click. I mean, > in your exemple, it's like you start at the begginning the periodical > updater, and after it reload every time there is new message the > target DIV. > > But in your case, it seems that the call is done only once on a uxer > click. So just use AJAX.Request, and on click launch it. The only > think you will do is to manually update the div with the result of the > AJAX call. > > no, actually I want the div to be loaded when the user clicks, and reloaded every minute it is visible. > -- > david > > On 15 nov, 15:36, bill <will...@techservsys.com> wrote: > >> When the user clicks a link it executes this function: >> function fPendingMail() { //set the mail div to show >> document.getElementById ("maildiv").style.display = "block"; >> new Ajax.PeriodicalUpdater('maildiv', 'mail/pending_mail.php', >> { >> method: 'get', >> frequency: 60, >> decay: 1 >> }); >> return false; //inhibit the href >> >> } >> >> and the maildiv appears and loads a list of pending mail messages and >> all is good. >> >> When they are done the script executes >> document.getElementById ("maildiv").style.display = "none"; >> >> I know the div is still updating and I don't need it to so: >> 1) how do I stop the periodicalUpdater. >> 2) should I be de-instanting (whatver the correct verb is) the object >> so that when the user clicks the link again it will not just keep >> creating more instances of the Ajax.PeriodicalUpdater ? >> >> bill >> >> -- >> Bill Drescher >> william {at} TechServSys {dot} com >> > > > >
-- Bill Drescher william {at} TechServSys {dot} com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---