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


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to