In my last email I forgot the opening and closing <javascript> tags
(or the symfony helper), but Rodrigo already gave you the correct
answer.

Try:

<?php echo javascript_tag("
        if($('mutsu').hasClassName('apple')) {
                alert('div has CSS apple class.');
        }
") ?>

--
Tiago Nunes


On Jan 15, 9:10 pm, Javier Garcia <tirengar...@gmail.com> wrote:
> On 01/15/2010 09:20 PM, Tiago Nunes wrote:
>
> > You're confusing PHP code with Javascript code, and that's not good.
>
> Thanks Tiago, it's true..
>
> Anywy im trying this:
>
> <?php echo javascript_tag("
>    if($('mutsu').hasClassName("apple")) {
>        alert("div has CSS apple class.");
>     }
> ") ?>
>
> And it doesn't work...
>
> No problem with ordinary code:
>
> <script type="text/javascript">
>     if($('mutsu').hasClassName("apple")) {
>        alert("div has CSS apple class.");
>     }
> </script>
>
> Javi
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to