What do you mean by 'some pairs'?
Looks like set() is what you want. What do you want your hash to look like before and after? - Kev buda wrote: > Sorry for not full description of my task - I need to add some pairs > to a hash - so set() doesnt hepl me :( > > On 26 авг, 01:18, Kevin Porter <k...@9ballpool.co.uk> wrote: > >> Oops sorry! Posted without testing, I didn't realise you lost that >> assignment notation with a $H() hash. >> >> - Kev >> >> >> >> >> >> DJ Mangus wrote: >> >>> what you want to do is h.set(input.id <http://input.id>, >>> input.getValue()) >>> >>> Seehttp://www.prototypejs.org/api/hash/set >>> >>> 2009/8/25 Kevin Porter <k...@9ballpool.co.uk <mailto:k...@9ballpool.co.uk>> >>> >>> Same: >>> >>> var h = $H({}); >>> h[input.id <http://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 >>> <mailto:k...@9ballpool.co.uk>> wrote: >>> >>> >> var h = {}; >>> >> h[input.id <http://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 <http://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 >>> <http://input.id> and value >>> >>> is an input.getValue()? >>> >>> >>> Thanks >>> >>> >> -- >>> >> Kevin Porter >>> >> Advanced Web Construction >>> Ltdhttp://webutils.co.ukhttp://billiardsearch.nethttp://9ballpool.co.uk >>> <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-Скрыть цитируемый текст - >>> >>> >> - Показать цитируемый текст - >>> >>> -- >>> 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 >>> >> -- >> 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 -~----------~----~----~----~------~----~------~--~---