This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Dynamic Form Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Dynamic Form Validation" Watch "Dynamic Form Validation" New topic
Author

Dynamic Form Validation

Jeetendra S Ahuja
Greenhorn

Joined: Feb 11, 2012
Posts: 7
In my jsp web page,an table is created dynamically,with columns:
MergeStop Sequence
Now MergeStop is readonly field which cannot be edited and sequence is text field which is to be filled by user,i want to do form validation of this dynamically created web page.
I know static validation i.e., by document.getElemnetById("").value.length>0/////but how to use same concept for varying id's created dynamically..
thank you
do help








Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Once an element has been created there's no difference between "dynamic" and "static". If you are creating the elements, then you should know what the id values are.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeetendra S Ahuja
Greenhorn

Joined: Feb 11, 2012
Posts: 7
Actually,,,,web page content changes dynamically......
so how it is possible to do form validation on varying text fields id's
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

How is it "changing dynamically"? If it's your code changing it, then you should know what id values are being generated. As I said, once the element is created, it doesn't matter how it was created, it can be treated the same as every other element.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Form Validation
 
Similar Threads
Server Side validation - what kind of work flow have to follow?
validation for the fileds whose names are dynamically generated.
Controlling Struts Validation Dynamically
AJAX Dynamic Wizard-like Form Problems
struts 1.3 customized valid when