Ajax Link Call To Function With Image As Icon
Join the DZone community and get the full member experience.
Join For Free// description of your code here
This railscode makes an ajaxcall to a action inside the controller and uses a image icon as the clickable area to trigger it. I am using it all over the place when doing nice looking admininterfaces.
link_to_remote (image_tag("/images/createchild.jpeg", :size => "17x17", :border => 0),
:url => {:action => 'acton_inside_controller', :id => record.id })
Icon
Links
Opinions expressed by DZone contributors are their own.
Trending
-
How to LINQ Between Java and SQL With JPAStreamer
-
Avoiding Pitfalls With Java Optional: Common Mistakes and How To Fix Them [Video]
-
An Overview of Kubernetes Security Projects at KubeCon Europe 2023
-
Extending Java APIs: Add Missing Features Without the Hassle
Comments