You're correct it should... but that does not fix the problem in this instance, in face it makes it worse. The reason I did not include the single quotes is because that escapes you from the parameters, and without single quotes $F(user_cert_agency) still functions correctly on a normal text input field.
Thanks, Ryan On Jan 12, 6:03 am, "Jonathan Rosenberg" <[email protected]> wrote: > Shouldn't this be > > $F('user_cert_agency') > > & not just > > $F(user_cert_agency) > > ???? > > -- > Jonathan Rosenberg > Founder & Executive Director > Tabby's Placehttp://www.tabbysplace.org > > -----Original Message----- > From: [email protected] > > [mailto:[email protected]] On Behalf Of > [email protected] > Sent: Monday, January 12, 2009 12:51 AM > To: Prototype & script.aculo.us > Subject: [Proto-Scripty] Problem with retrieving value from form select > > Hey all, > > I am using Ajax.Updater() to change the data in some drop down select > boxes. The update is triggered in onchange of the first select > field. I am passing the value of that selected option to a php script > that then builds the second dependent drop down option set. This is > the current piece of code as it is inline with the html: > > <select style="width: 24em;" name="user_cert_agency" > id="user_cert_agency" onchange="new Ajax.Updater('user_cert_type', > 'inc/actions/certifications.php', { method: 'post', parameters: > 'agency=' + $F(user_cert_agency)}); return false;"> > > I have tried both .getValue() and its shortcut $F() to no avail in > addition I have attempted to fetch the value with > user_cert_agency.options[selectedIndex].value with no success. If I > temporarily change the "supplying" field to a simple text input field > with the name and id of user_cert_agency and type in a value the > Ajax.Update (and backend php script) both work as expected. > > Yes, the parameters in my <option>'s are all correct with proper > values. > > Any ideas about this? Or should I be creating these dynamic drop down > select fields in a different fashion? > > Thanks again for the help. > > Ryan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
