RE: [Proto-Scripty] Getting the value of a form field

2010-04-30 Thread Jonathan Rosenberg
I think this might work. You could wrap it up into a function, of course, with name as a parameter. $$('input[type=radio][name=whatever]').find(function(radio) { return radio.checked; }).value; -- Jonathan Rosenberg Founder Executive Director, Tabby's Place

Re: [Proto-Scripty] Getting the value of a form field

2010-04-30 Thread Shane McCarron
Clever! I will try that. Another approach that might work for some is to serialize the form data into a hash. Then you should have the values for each form control indexed by their name. var h = $('formId').serialize( true ) ; Then, for a form control with a name of 'name' you can do: if