I am a little late to this thread, but I had just the same problem,
and came out with a different solution, that I hope could be more
generally useful:
'getValueForKeyInFormContent': function (aFormContent, aKey) {
return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)];
}
aFormContent is supposed to be the result of the
MochiKit.DOM.formContents function.
Hope this helps you.
Best regards,
Giulio Cesare Solaroli
On 1/12/06, Will <[EMAIL PROTECTED]> wrote:
>
> oh, duh! of course. Thanks!
>
>
> Karl Guertin wrote:
>
> >On 1/11/06, Will <[EMAIL PROTECTED]> wrote:
> >
> >
> >>function cherryPick( myform ) {
> >> var val = formContents(myform).somename; //get value of specified
> >>input name
> >>}
> >>
> >>
> >
> >var val = myform.somename.value
> >
> >Assuming myform is a form dom node and the input field of interest has
> >'somename' as the name attribute. Just doing myform.somename gets you
> >the input field itself. This is standard javascript, not mochikit
> >specific.
> >
> >
> >
>
>