|
Mailing Lists
|
Home /
Groups /
Javascript
Need help with dynamic form fields
helloTorrent Girl 05/30/09 08:48 P Try something like this:Maya Tulchinsky 05/31/09 02:58 P 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. 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.
|
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||