struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: validate an html:multibox and show messages in the own page
Date Thu, 14 Sep 2006 19:53:34 GMT
Heidy Gutiérrez Guzmán wrote:
> Hi
> I'm using the <html:multibox /> struts tags.
> I need validate the total of "checked" that have been selected.
> I can do that with java script code, but i need put a var in the session
> scope with the purpose of show the error message later, and that, i can not
> do that with the java script code.

I'm not sure I understand your question. No, you can't access the 
session from Javascript, since the session lives on the server and the 
Javascript runs in the browser. However, any validation you code in 
Javascript should be backed by server-side validation (in case the user 
has turned Javascript off).

Your client-side validation can present the error message however it 
likes; your server-side validation can use the standard saveMessages() 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message