On Jun 14, 5:33 pm, Rodrigo Felix <[email protected]>
wrote:
> Does anybody knows how can I check if an HTML element exists via rjs? I've
> been trying, for example:
>
> if page['edit_company_' + @id]
>
> if page['edit_company_' + @id].blank?
>
> But it generates a js code with a .blank? and it doesn't make any sense in
> js. I need this to take some actions only if a certain element exists. Any
> suggestion? Thanks in advance.
>
I wrote a bit about this a little while back:
http://www.spacevatican.org/2008/5/26/conditional-rjs-explained
Fred
> --
> Rodrigo Felix
> Web Developer
> SCJP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---