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

how to validate html:text without usind validate framework of struts

 
Bonny Sen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

Can anyone help me and tell how to validate html:text without usind validate framework of struts. I would like to use java script and validate the text box from the client side using java script.
 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bonny,
you are free to do any thing in javascript with struts.
in fact some times i feel the validator facility provided by struts is not enough & complete ().The point to use javascript is that client side validation saves server resources.
but you may get stucked if your application supports multiple languages.
Some more reason may be there......

Vijay.
 
Rajkamal Pillai
Ranch Hand
Posts: 445
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bonny,

I dont see any difference if you are going to validate html:text using client side Javascript. Becasue by the time the browser renders the page the <html:text> element becomes an <input> element. If the element has an ID or name you can always access it using Javascript and write code to do whatever kind of validation you require.

Cheers,
Rajkamal.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic