oh, forgot to mention instead of input.id you might want to use
input.identify() as it will return the id, or if the element is missing an
id, assign one and then return the assignment.

On Tue, Aug 25, 2009 at 2:55 PM, DJ Mangus <d.man...@gmail.com> wrote:

> what you want to do is h.set(input.id, input.getValue())
> See http://www.prototypejs.org/api/hash/set
>
> 2009/8/25 Kevin Porter <k...@9ballpool.co.uk>
>
>
>> Same:
>>
>> var h = $H({});
>> h[input.id] = input.getValue();
>>
>> - Kev
>>
>>
>> buda wrote:
>> > Thanks for replay, but
>> > I Do need to add it to a $H object !!!!
>> >
>> > how to do it? Thanks )
>> >
>> > On 26 авг, 00:14, Kevin Porter <k...@9ballpool.co.uk> wrote:
>> >
>> >> var h = {};
>> >> h[input.id] = input.getValue();
>> >>
>> >> Doesn't even need to be a $H(), just a regular JS object/hash.
>> >>
>> >> - Kev
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> buda wrote:
>> >>
>> >>> I need to add to a hash id of an input and its value
>> >>> when I try to do
>> >>>
>> >>>  var h = $H({});
>> >>>  h.update({ input.id: input.getValue() });
>> >>>
>> >>> an error of bad syntax is generated
>> >>>
>> >>> how can I add an element to a hash which key is an input.id and value
>> >>> is an input.getValue()?
>> >>>
>> >>> Thanks
>> >>>
>> >> --
>> >> Kevin Porter
>> >> Advanced Web Construction
>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk
>> >>
>> >> AJAX Blackjack - real-time multi-player blackjack game with no flash,
>> java or software downloads required -http://blackjack.webutils.co.uk-Скрыть 
>> цитируемый текст -
>> >>
>> >> - Показать цитируемый текст -
>> >>
>> > >
>> >
>> >
>> >
>> >
>>
>>
>> --
>> Kevin Porter
>> Advanced Web Construction Ltd
>> http://webutils.co.uk
>> http://billiardsearch.net
>> http://9ballpool.co.uk
>>
>> AJAX Blackjack - real-time multi-player blackjack game with no flash, java
>> or software downloads required - http://blackjack.webutils.co.uk
>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to