This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes how we return error in javascript message box ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how we return error in javascript message box ?" Watch "how we return error in javascript message box ?" New topic
Author

how we return error in javascript message box ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
hi, good day, how can we return error message in javascript message box ?
for example, when we capture the error from exception handling and save it to errors, how can we display these error in javascript message box ?

thank you
Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
If you are talking about ActionError/Actionmessages set on the server side
to be disaplyed on the client side, then I don't think we can do this using javascript message box(alert box).

ActionMessages/ActionErrors are displayed on the top of the page as bullentins(we can change bulletins to be something else).
All we need in jsp is the html:message tag.

Hope this helps
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you use the Struts Validation framework to do your validation, that has the ability to do client-side validation, meaning that it will display error messages in JavaScript alert boxes.

To find out more about how to use the Struts Validation framework, see this link.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how we return error in javascript message box ?