• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how we return error in javascript message box ?

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic