This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes hwo to add javascript code in validator-rules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "hwo to add javascript code in validator-rules" Watch "hwo to add javascript code in validator-rules" New topic
Author

hwo to add javascript code in validator-rules

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
i am little bit poor in writing java script for writing the validations in validator-rules.xml file
and more over i need to validate at client side
so is there any thing for generating java script in validator-rules.xml?


please somebody help me is ther way to add javascript code for these kind of validations


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Mani Venkata Kanth
Ranch Hand

Joined: Aug 21, 2006
Posts: 39
hi
there is a tag html:javascript in struts-html.tld for enable java script validations in your web page.

no need to write anything in validation-rules.xml

just place this statement in your jsp page:
<html:javascript formName="return loginForm.validate()"/>

if your form name is loginForm in config file.
 
Have you checked out Aspose?
 
subject: hwo to add javascript code in validator-rules
 
It's not a secret anymore!