Try something like this: in javascript: varName = "compensationType_" + userID; varFormField = document.getElementsByName(varName); now you can get value from varFormField.value.
--- On Sat, 5/30/09, Torrent Girl <[email protected]> wrote: From: Torrent Girl <[email protected]> Subject: Need help with dynamic form fields To: "javascript" <[email protected]> Date: Saturday, May 30, 2009, 5:42 PM hello I have an issue that I am stuck on. I need to check the value of dynamic form fields with javascript and don't know how. Here is what the form fields look like: compensationType_userID (this is the field name) The userID will be the dynamic part. How do I check for the value in javascript on the form submission? "If compensation type = salary, then do this..." Thank you. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/javascript/message.cfm/messageid:5904 Subscription: http://www.houseoffusion.com/groups/javascript/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.33
