House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Javascript

Need help with dynamic form fields

Author:
Maya Tulchinsky
05/31/2009 02:58 PM

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 <torrentgirl@gmail.com> wrote: From: Torrent Girl <torrentgirl@gmail.com> Subject: Need help with dynamic form fields To: "javascript" <js-jive@houseoffusion.com> 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.


Search javascript

February 12, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29