You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Session A Mwamufiya <sm...@andrew.cmu.edu> on 2007/08/04 02:52:03 UTC

popping messages from an action

Hi,

I know that I've sent many questions today, so please bear with me once more.  I'd like to have my action popup a message to the user if a submit button is pressed and the entered data is incorrect.  Is that possible?  Or if not from struts 2, is there a way for struts 2 to execute html code from within an action (which I could code to have a message box popup).

Thanks,
Session


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: popping messages from an action

Posted by Rene Gielen <gi...@it-neering.net>.
Session,

your question is not very much related to struts in the first place, but 
more to understanding web technologies such as html, http and 
javascript. The brief answer to your question is: yes, it works, but it 
is a bit complicated due to the http request/response system and usually 
introduces the need to write some javascript code.
How about starting more simple at first? Use the struts2 form elements 
along with validation, and see how the information for bad input is 
rendered automatically within the form after validation process, at next 
to no costs in terms of having to program lots of js/html magic.

Regards,
Rene

Session A Mwamufiya schrieb:
> Hi,
> 
> I know that I've sent many questions today, so please bear with me once more.  I'd like to have my action popup a message to the user if a submit button is pressed and the entered data is incorrect.  Is that possible?  Or if not from struts 2, is there a way for struts 2 to execute html code from within an action (which I could code to have a message box popup).
> 
> Thanks,
> Session
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


-- 
Rene Gielen  | http://it-neering.net/
Aachen       | PGP-ID: BECB785A
Germany      | gielen at it-neering.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org