link_to_remote generates the javascript: new Ajax.Updater(…). Have I
missed something or doesn’t this handle browsers with javascript support
but without XHR support?
What I’d like to do is:
If the browser supports XHR, use XHR
If the browser supports javascript (and perhaps even if the XHR
request fails) do a POST via javascript
If the browser doesn’t support javascript use POST via a standard
form
as well as have those files in your javascripts folder found in the
public directory?
there is also a url_for attribute that you can add to your
link_to_remote that will do a post if the browser does not have
javascript turned on or does not support it.
as well as have those files in your javascripts folder found in the
public directory?
Yes. link_to_remote works when I use a browser with XHR support so
everything is set up correctly.
there is also a url_for attribute that you can add to your
link_to_remote that will do a post if the browser does not have
javascript turned on or does not support it.
Do you mean options[‘url’]? Won’t it just do a GET on that url if
javascript is turned off (I want a POST)? And that still don’t address
browsers without XHR support.
/Jonas
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.