[Proto-Scripty] Re: Anomaly in IE8 or am I assuming too much from $('formName').serialize(true)?

2009-10-28 Thread bernard
right-o. merci.
  - Original Message - 
  From: T.J. Crowder 
  To: Prototype & script.aculo.us 
  Sent: Wednesday, October 28, 2009 1:43 AM
  Subject: [Proto-Scripty] Re: Anomaly in IE8 or am I assuming too much from 
$('formName').serialize(true)?



  Hi,

  > Doesn't serialize() just work with Element.id?

  No, the `name` and `id` attributes have completely different
  purposes.  A form field must have a `name` attribute to be sent as
  part of the form (this is an HTML thing, not a Prototype thing).  The
  `id` attribute is unrelated to forms, it's used for addressing
  elements (looking them up in JavaScript or using them as anchors).

  HTH,
  --
  T.J. Crowder
  Independent Software Consultant
  tj / crowder software / com
  www.crowdersoftware.com


  On Oct 27, 9:07 pm, "bernard"  wrote:
  > I have a form whose elements (input, select) were given explicit IDs, but 
no name.
  > when I do this:
  > var parmHash;
  > parmHash = $('myForm').serialize(true)
  > parmHash is empty. When i gave the form elements name='someName',
  > parmHash is completed as expected. Doesn't serialize() just work with 
Element.id?
  >
  > 
  > Ozy: Life is full of disappointments.
  > Millie: No it isn't. I can always fit more in.
  > [D.C. Simpson]
  > 
  > A little trust goes a long way. The less you use,
  > the farther you'll go.
  > [Howard Tayler]
  

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Anomaly in IE8 or am I assuming too much from $('formName').serialize(true)?

2009-10-28 Thread T.J. Crowder

Hi,

> Doesn't serialize() just work with Element.id?

No, the `name` and `id` attributes have completely different
purposes.  A form field must have a `name` attribute to be sent as
part of the form (this is an HTML thing, not a Prototype thing).  The
`id` attribute is unrelated to forms, it's used for addressing
elements (looking them up in JavaScript or using them as anchors).

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Oct 27, 9:07 pm, "bernard"  wrote:
> I have a form whose elements (input, select) were given explicit IDs, but no 
> name.
> when I do this:
>   var parmHash;
>   parmHash = $('myForm').serialize(true)
> parmHash is empty. When i gave the form elements name='someName',
> parmHash is completed as expected. Doesn't serialize() just work with 
> Element.id?
>
> 
> Ozy: Life is full of disappointments.
> Millie: No it isn't. I can always fit more in.
> [D.C. Simpson]
> 
> A little trust goes a long way. The less you use,
> the farther you'll go.
> [Howard Tayler]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---