Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom javascript function in struts

 
Jitto P.Jose
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am supposed to use my own javascript functions in my struts application. where could i specify these functions in my application?. is it in validation.xml?
 
Sreejith Kayapuram
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jitto,
i think it should be writtern in ValidationRules.xml.
 
Jitto P.Jose
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but it didnt work when i wrote it in validation-rules.xml..
is there any special format for writing javascript functions?
please help me
thanks.
 
Jitto P.Jose
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is anyone out there to help me....
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the purpose of these javascript functions? If you are not talking about validation scripts then there is nothing Struts specific about writing javascript. You can include the functions in your jsp file or in a separate file that you include in your jsp file. If you are trying to write javascript for custom validation rules then could you expand on "it didnt work"?

- Brent
 
Jitto P.Jose
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you brent
I wished to include some custom validation functions to validate input fields at client side other than using the built in validation technique of struts. I thought there is some way to specify these rules in some xml file so that I can avoid hard coding in the page.
Anyway thank you for your help.
jittos....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic