This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using struts validator to check onchange events.

 
Karthik Muthukumaraswamy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I am using Struts validator framework to validate form fields. I have been using it for client side validations when the form is submitted. Is it possible to couple the validator checking with onChange events?

For example,
is it possible to check whether an input field's value is an Integer during onChange event for that field.

Thank you.
-Karthik.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64828
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a forum dedicated to Struts questions. I'll move this post there for you.
[ October 30, 2006: Message edited by: Bear Bibeault ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never tried this, but I see no reason why you couldn't do it. Just use your browser's "view source" function to see the generated JavaScript code for the page. Then, see what function is being called by the generated code to validate the field you're interested in and call that same function from its onchange event.
 
Karthik Muthukumaraswamy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Merill. I will try to see to implement it with your suggestion in mind. I will keep you posted.
-Karthik.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic