I am not sure how your page loading is working - with ajax or without
- so here is what I would do based on your information:

In the first ajax call to the bar action, retrieve the dynamic
condition and return it together with the ajax result. Then act upon
it as you want.

Enjoy,
   John

On Mar 24, 1:22 am, alex bailey <v...@planet-generals.de> wrote:
> Hi guys,
>
> I'm having a problem with my project where I could freak out about.
> The situation is the following:
>
> I have a controller foo which has an action bar.
>
> Now the thing i want to get going: have the bar action running all the
> time while your on the page by a fixed interval with a condition if a
> certain entry is made in the database.
>
> I got it to work by using ajax and the remoteTimer method. But now I
> have the following problem:
>
> I can't figure out how I can have a "dynamic condition"  like: Only
> run the ajax event if a certain field in database is set to 0 or 1
>
> I know I can control the execution by the condition param and using a
> javascript If() (Like: 'condition' => '10 == 90' which will prevent it
> from running) in there but is it possible to populate this condition
> dynamically from the database or is there even a better way to handle
> this whole situation?
>
> Big thanks in advance.
>
> Regards
>
> Alex

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to