This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes validation for the fileds whose names are dynamically generated. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validation for the fileds whose names are dynamically generated." Watch "validation for the fileds whose names are dynamically generated." New topic
Author

validation for the fileds whose names are dynamically generated.

lusha tak
Ranch Hand

Joined: Dec 30, 2000
Posts: 185
it is related to the javascript validation for the fileds whose names are dynamically generated.
I have used the jsp file.From the database I m retreiving the rows & displaying it in table format in the JSP page for modification .As the no of rows cannot be fixed & each modified field need to be captured ,the name of the input types(HTML) has to be dynamically generated.But now the problem is that if somebody modifies any of the fields in any of the rows then for apllying validation at the form level what should one do. The name of the rows are dynamically generated.How to apply validation at the front end?
Thanx in advance.
Lusha
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I would use client-side JavaScript to loop through the fields in the forms collection. Use the for...in construct.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: validation for the fileds whose names are dynamically generated.