I''m just looking at adding some AJAX to my app and am considering turning some link_to''s into link_to_remotes and I could do with knowing if link_to_remote degrades to an HTML request if javascript is not enabled in a users browser? If so, is there anything special I need to do with the link_to_remote call to make that happen? Thanks -- Posted via http://www.ruby-forum.com/.
just make sure you''ve include prototype.js. and enable javascript function on your browser. regards. On 8/24/09, James West <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m just looking at adding some AJAX to my app and am considering > turning some link_to''s into link_to_remotes and I could do with knowing > if link_to_remote degrades to an HTML request if javascript is not > enabled in a users browser? > If so, is there anything special I need to do with the link_to_remote > call to make that happen? > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > > >-- David Angga Prasetya Ruby on Rails developer http://www.wgs.co.id carsmetic.oc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Maurício Linhares
2009-Aug-24 12:10 UTC
Re: Does link_to_remote degrade to an HTML request?
It will not degrade automatically, you''ll have to tell it to do so adding an :href property: link_to_remote "Delete this post", { :update => "posts", :url => { :action => "destroy", :id => post.id } }, :href => url_for(:action => "destroy", :id => post.id) - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Mon, Aug 24, 2009 at 8:41 AM, James West<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m just looking at adding some AJAX to my app and am considering > turning some link_to''s into link_to_remotes and I could do with knowing > if link_to_remote degrades to an HTML request if javascript is not > enabled in a users browser? > If so, is there anything special I need to do with the link_to_remote > call to make that happen? > > Thanks > -- > Posted via http://www.ruby-forum.com/. > > > >
Maurício Linhares wrote:> It will not degrade automatically, you''ll have to tell it to do so > adding an :href property: > > link_to_remote "Delete this post", > { :update => "posts", :url => { :action => "destroy", :id => post.id > } }, > :href => url_for(:action => "destroy", :id => post.id) > > - > Maur�cio Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Mon, Aug 24, 2009 at 8:41 AM, JamesThat''s exactly what I needed. Thank you very much -- Posted via http://www.ruby-forum.com/.
David Angga wrote:> just make sure you''ve include prototype.js. > and enable javascript function on your browser. > > regards. > > On 8/24/09, James West <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > David Angga Prasetya > Ruby on Rails developer > http://www.wgs.co.id > carsmetic.oc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.orgThanks, I''m going to have a play with jQuery :-) -- Posted via http://www.ruby-forum.com/.