Monday, September 28, 2009

Javascript inside a ajax content not work

Hi
I use ajax helper to load the content of a div inside my page.
In this ajax content I have this:
<?php echo $javascript->codeBlock('var value='.$value.';'); ?>

But when I try to use the javascript variable value I get the error
that the value doesn't exist.
In my ajax call I have set eval to true.
Can someone tell me what is the best practise to use javascript inside
ajax content?
Many Thanks
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: