method
button_to_function
v1.1.6 -
Show latest stable
- Class:
ActionView::Helpers::JavaScriptHelper
button_to_function(name, function, html_options = {})public
Returns a link that’ll trigger a JavaScript function using the onclick handler.
Examples:
button_to_function "Greeting", "alert('Hello world!')" button_to_function "Delete", "if confirm('Really?'){ do_delete(); }")