Hi all, How to make an html textarea read only in one mode and make the same textfield as editable in other mode? can anyone give me a solution for this? Thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
set the readonly attribute and change it if necessary via AJAX. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
HTML property is disabled="true" If you don''t know how to specify HTML options, look at the api Blog: http://random8.zenunit.com/ Learn rails: http://sensei.zenunit.com/ On 05/02/2009, at 6:51 PM, sam rlo <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi all, > How to make an html textarea read only in one mode and make the same > textfield as editable in other mode? can anyone give me a solution for > this? > > Thanks in advance > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Julian Leviston wrote:> HTML property is disabled="true" > > If you don''t know how to specify HTML options, look at the api > > Blog: http://random8.zenunit.com/ > Learn rails: http://sensei.zenunit.com/ > > On 05/02/2009, at 6:51 PM, sam rlo <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Thanks a lot -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 09 Feb 2009, at 10:24, sam rlo wrote:>> HTML property is disabled="true" >> >> If you don''t know how to specify HTML options, look at the apiThe correct notation is: disabled="disabled" as defined by the API at http://www.w3schools.com/tags/att_input_disabled.asp and http://www.w3schools.com/tags/att_option_disabled.asp Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Setting a HTML element (textarea, select, input...) as disabled would not skip this element from being submitted?? On Mon, Feb 9, 2009 at 9:49 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>wrote:> > On 09 Feb 2009, at 10:24, sam rlo wrote: > > HTML property is disabled="true" > > > If you don''t know how to specify HTML options, look at the api > > > The correct notation is: > > disabled="disabled" > > as defined by the API at > http://www.w3schools.com/tags/att_input_disabled.asp and > http://www.w3schools.com/tags/att_option_disabled.asp > > > Best regards > > > Peter De Berdt > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Disabled form elements are not submitted. You can try with readonly="readonly" That may or may not work, you''ll have to test it out. The other option is to enable the input element just before submitting the form (use Javascript to enable it). On 09 Feb 2009, at 16:00, Mathieu Rousseau wrote:> Setting a HTML element (textarea, select, input...) as disabled > would not skip this element from being submitted?? > > On Mon, Feb 9, 2009 at 9:49 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org > > wrote: > > On 09 Feb 2009, at 10:24, sam rlo wrote: > >>> HTML property is disabled="true" >>> >>> If you don''t know how to specify HTML options, look at the api > > The correct notation is: > > disabled="disabled" > > as defined by the API at http://www.w3schools.com/tags/att_input_disabled.asp > and http://www.w3schools.com/tags/att_option_disabled.aspBest regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mon, Feb 9, 2009 at 3:49 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> as defined by the API at http://www.w3schools.com/Why in the world would you specify a non-definitive third-party web site for "the API" when the actual recommendation is available??? <http://www.w3.org/TR/html401/> is the real deal. And yes, everyone doing web development should read and bookmark it. FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
But I really don''t see a reason why you would want to do that. Since you want the form element to be readonly, it kind of implies you don''t want its value submitted back to the server. On 09 Feb 2009, at 16:13, Peter De Berdt wrote:> Disabled form elements are not submitted. You can try with > > readonly="readonly" > > That may or may not work, you''ll have to test it out. > > The other option is to enable the input element just before > submitting the form (use Javascript to enable it). > > > On 09 Feb 2009, at 16:00, Mathieu Rousseau wrote: > >> Setting a HTML element (textarea, select, input...) as disabled >> would not skip this element from being submitted?? >> >> On Mon, Feb 9, 2009 at 9:49 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org >> > wrote: >> >> On 09 Feb 2009, at 10:24, sam rlo wrote: >> >>>> HTML property is disabled="true" >>>> >>>> If you don''t know how to specify HTML options, look at the api >> >> The correct notation is: >> >> disabled="disabled" >> >> as defined by the API at http://www.w3schools.com/tags/att_input_disabled.asp >> and http://www.w3schools.com/tags/att_option_disabled.aspBest regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 09 Feb 2009, at 16:14, Hassan Schroeder wrote:>> as defined by the API at http://www.w3schools.com/ > > Why in the world would you specify a non-definitive third-party web > site for "the API" when the actual recommendation is available??? > > <http://www.w3.org/TR/html401/> is the real deal. And yes, everyone > doing web development should read and bookmark it.Because they say exactly the same thing, only the w3.org page is less clear imho. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mon, Feb 9, 2009 at 7:21 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> <http://www.w3.org/TR/html401/> is the real deal. And yes, everyone > doing web development should read and bookmark it. > > Because they say exactly the same thing, only the w3.org page is less clear > imho.But it''s unequivocally correct, whereas the "w3schools" version has had reported errors, at least in the past. When in doubt, going to the actual recommendation/RFC/standard is preferable practice, IMHO. YMMV, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---