Alex McAuley wrote:
>  
> myInstance=new Ajax.PeriodicalUpdater(....
>  
>  
>  
> TO check it ...
>  
> If(myInstace)  {
> do some code here
>  
>
Gee, that is easy, no wonder I couldn't find it :-)
I am more used to PHP so I was looking for something like "if 
(isset(myinstance))"

should be a piece of cake.


Many thanks,

bill

>     ----- Original Message -----
>     *From:* bill <mailto:will...@techservsys.com>
>     *To:* prototype-scriptaculous@googlegroups.com
>     <mailto:prototype-scriptaculous@googlegroups.com>
>     *Sent:* Wednesday, November 18, 2009 11:11 AM
>     *Subject:* Re: [Proto-Scripty] Re: instanting and reinstanting a
>     function: Ajax.PeriodicalUpdater
>
>     Alex McAuley wrote:
>>     No need to worry about multiple instances ... just check the
>>     variable before you initialise it...
>>     Alex Mcauley
>>     http://www.thevacancymarket.com
>
>     Thanks again david and Alex.
>     I looked but could not find the code to check to see if the
>     variable held an instance or was null.
>     Might I beg for one line of code to show me how to check the
>     variable ?
>
>     bill
>>
>>         ----- Original Message -----
>>         *From:* bill <mailto:will...@techservsys.com>
>>         *To:* prototype-scriptaculous@googlegroups.com
>>         <mailto:prototype-scriptaculous@googlegroups.com>
>>         *Sent:* Tuesday, November 17, 2009 3:18 PM
>>         *Subject:* [Proto-Scripty] Re: instanting and reinstanting a
>>         function: Ajax.PeriodicalUpdater
>>
>>         david wrote:
>>>         Bill,
>>>
>>>         just a precision (in Fact I did not understand that you still need 
>>> to
>>>         get every minutes the result):
>>>         the stop() method is at 
>>> http://api.prototypejs.org/ajax/ajax/periodicalupdater.html#stop-instance_method
>>>
>>>         normally, you could stop & start the peridical updater at will.
>>>
>>>         --
>>>         david
>>>           
>>         Thanks david and Alex,
>>
>>         So what is the best practice:
>>         1) create the periodicalupdater when the page loads, stopping
>>         it immediately and then start it when the div becomes visible
>>         and stop it when the div becomes invisible.
>>
>>         2) create the periodicalupdater when it becomes visible and
>>         stop it when it becomes invisible
>>
>>         Or is there any difference ?
>>         (I worry about multiple instanting the periodicalupdater )
>>
>>         -- 
>>         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
>>         -~----------~----~----~----~------~----~------~--~---
>>
>
>
>     -- 
>     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-scriptacul...@googlegroups.com.
>     For more options, visit this group at
>     http://groups.google.com/group/prototype-scriptaculous?hl=.
>
> --
>
> 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-scriptacul...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=.


-- 
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-scriptacul...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=.


Reply via email to