I’d like to use on browsers supporting AJAX link_to_remote or
button_to_function/remote_function and on rest button_to and link_to.
How can I determine it?
Send both systems, and let the browser figure it out, like this:
<%= my manual buttons %>
<%= javascript_tag … %>
A browser without JavaScript will render the HTML inside , so
put
your buttons there. And only a browser with JavaScript will respect
the
tags that javascript_tag inserts, so I suspect you could put
'document.write' calls in there that insert your link_to_remote tags.
/Pragmatic Ajax/ has a great section on degradability, but I don't know
if
it has the trick.
--
Phlip
http://www.oreilly.com/catalog/9780596510657/
"Test Driven Ajax (on Rails)"
assert_xpath, assert_javascript, & assert_ajax