Re: [symfony-users] Question about link_to_remote: 'complete' option

2009-12-16 Thread DEEPAK BHATIA
 Try this way...

 'publishing/refresh',

'complete' => 'updateclass()'

)) ?>




On Mon, Dec 14, 2009 at 5:38 PM, tirengarfio  wrote:

> Hi,
>
> i want to change the class of a  after clicking a link. In the
> same time i would like to execute a symfony action. For that, im using
> link_to_remote this way:
>
> 
>
>Message's content
>
>
>
> 'url' => 'mensaje/cambiarEstadoLeido,
>
>'update' => 'message_1',
>
>'complete' => 'document.getElementById
> ("message_1").className("read_message");',
>
>)); ?>
>
>
>
> 
>
>
> My problem: after clicking on the link the class of the div doesn't
> change...
>
> I don't have any problem using link_to_function and a .js file.
>
> Any idea?
>
>
> Regards
>
> 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.
>
>
>

--

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.




Re: [symfony-users] Question about link_to_remote: 'complete' option

2009-12-16 Thread DEEPAK BHATIA
Try this

 'complete' =>
"document.getElementById('message_1').className('read_message')",

On Mon, Dec 14, 2009 at 5:38 PM, tirengarfio  wrote:

> Hi,
>
> i want to change the class of a  after clicking a link. In the
> same time i would like to execute a symfony action. For that, im using
> link_to_remote this way:
>
> 
>
>Message's content
>
>
>
> 'url' => 'mensaje/cambiarEstadoLeido,
>
>'update' => 'message_1',
>
>'complete' => 'document.getElementById
> ("message_1").className("read_message");',
>
>)); ?>
>
>
>
> 
>
>
> My problem: after clicking on the link the class of the div doesn't
> change...
>
> I don't have any problem using link_to_function and a .js file.
>
> Any idea?
>
>
> Regards
>
> 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.
>
>
>

--

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.




Re: [symfony-users] Question about link_to_remote: 'complete' option

2009-12-14 Thread Gareth McCumskey
"complete"=>"$('message_1').toggleClassName('read_message');"

http://www.prototypejs.org/api/element/toggleClassName

On Mon, Dec 14, 2009 at 2:08 PM, tirengarfio  wrote:
>
> Hi,
>
> i want to change the class of a  after clicking a link. In the
> same time i would like to execute a symfony action. For that, im using
> link_to_remote this way:
>
> 
>
>    Message's content
>
>        
>
>                                             'url' => 'mensaje/cambiarEstadoLeido,
>
>                                'update' => 'message_1',
>
>                                'complete' => 'document.getElementById
> ("message_1").className("read_message");',
>
>                )); ?>
>
>        
>
> 
>
>
> My problem: after clicking on the link the class of the div doesn't
> change...
>
> I don't have any problem using link_to_function and a .js file.
>
> Any idea?
>
>
> Regards
>
> 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.
>
>



--
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--

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.