#Remote Function Call
remote_function( :url => {:action => 'close_div'}, :with => "'div_id="+@div_id+"'") %>
# button_to_function
button_to_function "Greeting", "alert('Hello world!')"
button_to_function "Close", remote_function(:url => {:action => 'close_div'}, :with => "'div_id="+@div_id+"'")
# link_to_function
link_to_function "Greeting", "alert('Hello world!')"
# link_to_remote
link_to_remote "Delete this post", :update => "posts", :url => { :action => "destroy", :id => post.id }
No comments:
Post a Comment