Does anyone know why Prototype adds disabled fields to the query string generated by Form.serialize()? I have looked through the code, there is no way around that, I''ll have to do it by hand. Nevertheless, I find that behavior a little irritating. Any ideas why it''s implemented like this? Cheers, - David
Because that''s how form behaviour is defined? I don''t know what browser you''re using, but anything I''ve ever seen sends disabled elements along just like every other element. In my experience the only deviation between a browser''s normal behaviour and the Form.serialize function is the handling of multiple submit elements. -Rob David Zülke wrote:> Does anyone know why Prototype adds disabled fields to the query string > generated by Form.serialize()? > > I have looked through the code, there is no way around that, I''ll have > to do it by hand. > > Nevertheless, I find that behavior a little irritating. Any ideas why > it''s implemented like this? > > Cheers, > > - David > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> Because that''s how form behaviour is defined? I don''t know whatbrowser> you''re using, but anything I''ve ever seen sends disabled elementsalong> just like every other element.It''s been too long since I looked into it, but either IE or Firefox does not send disabled elements along. Of course, at the time I discovered it, it was Netscape 6, not Firefox, that was available. So, it may have been only early versions and they changed it at some point. Then again, I keep finding out things I tried to do back then now somehow work magically, so maybe it''s another case of me being confused :) Greg
You''re wrong, I''m afraid. Disabled elements are never sent. I don''t know any browser that does not adhere to this part of the HTML spec (http://www.w3.org/TR/html4/interact/forms.html, read sections 12 and 13.2). Maybe you are confusing this with fields set to "display:none" - David Am 03.03.2006 um 16:35 schrieb Robin Haswell:> Because that''s how form behaviour is defined? I don''t know what > browser > you''re using, but anything I''ve ever seen sends disabled elements > along > just like every other element. > > In my experience the only deviation between a browser''s normal > behaviour > and the Form.serialize function is the handling of multiple submit > elements. > > -Rob > > David Zülke wrote: >> Does anyone know why Prototype adds disabled fields to the query >> string >> generated by Form.serialize()? >> >> I have looked through the code, there is no way around that, I''ll >> have >> to do it by hand. >> >> Nevertheless, I find that behavior a little irritating. Any ideas why >> it''s implemented like this? >> >> Cheers, >> >> - David >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >