aspose file tools*
The moose likes Struts and the fly likes Using struts validator to check onchange events. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using struts validator to check onchange events." Watch "Using struts validator to check onchange events." New topic
Author

Using struts validator to check onchange events.

Karthik Muthukumaraswamy
Greenhorn

Joined: Oct 30, 2006
Posts: 12
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

Joined: Jan 10, 2002
Posts: 61769
    
  67

We have a forum dedicated to Struts questions. I'll move this post there for you.
[ October 30, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Karthik Muthukumaraswamy
Greenhorn

Joined: Oct 30, 2006
Posts: 12
Thanks Merill. I will try to see to implement it with your suggestion in mind. I will keep you posted.
-Karthik.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using struts validator to check onchange events.