How do i use a button to perform an ajax call. Im not updating/creating a form so submit_to_remote wont work as it is expecting form options.
button_to_function is just for javascript from what ive read.
I could use css to maybe appear that it is a button but this is not the route i want to take.
<%= submit_to_remote 'next_lever_btn', "Go to next" , :url => { :action => "load_questions", :id => @next_cat}, :before => "Element.show('main_spinner')", :success => "Element.hide('main_spinner')" %>
Anyone got a solution?
JB