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 <[email protected]> > > 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 <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
