Oliver Paulus
2007-Mar-06 17:49 UTC
link_to, image_submit_tag, "changes only with POST" and "usability without Javascript" question
Hello, I want to have the following features in my rails application: 1. the program should have AJAX if Javascript available 2. I want to protect my application described in http://www.w3.org/2001/tag/doc/whenToUseGet.html - means GET should be safe 3. if Javascript is disabled the application should work too (without AJAX) If I use "GET should be safe" option (verify) and link_to with :method => ''post'' option these links do not work anymore with Javascript disabled. My idea was now to use image_submit_tag to do e.g. a ''delete'' action on list page. For this option I have to encode the action (delete) and the id of the entity within the value option of the generated HTML "input" tag. Is there a plugin for this avalailable? The downside of this is that I have one form action which has to decode the "value" content and delegate to the right action. Did I miss something? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Oliver Paulus
2007-Mar-07 10:39 UTC
Re: link_to, image_submit_tag, "changes only with POST" and "usability without Javascript" question
Ok. I solved it. I make a form_tag with a image_submit_tag for each action which modifies something (POST). all others can use link_to (GET). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---