Dirk, I used that on my last project. In my resource bundle I had the following:
errors.header=<script language='javascript'>alert( errors.footer='');</script>
general.validate.date='A Date if given must be a valid Date in the format {0}!\\n' +
Note the apostrophes and the plus sign, so that a whole series of error messages would pop up only in one alert.
This was with <html:errors/>, that take the header and footer from the bundle. I'm not sure how you would adapt it to <html:messages>, but good luck!
HTH Adam
On 01/22/2004 03:48 PM Dirk Manske (Service Respond) wrote:
oh yes but the problem is that it pops up x times if x entries were wrong. however, it should popup only once showing all wrong entries...
my actual code cannot handle it:
<logic:messagesPresent>
<script language="javascript">
<html:messages id="error">
alert("<c:out value="${error}" />")
</html:message>
</script>
</logic:messagesPresent>
any idea? Dirk
-----Ursprüngliche Nachricht-----
Von: Martin Gainty [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 22. Januar 2004 15:21
An: Struts Users Mailing List; [EMAIL PROTECTED]
Betreff: Re: how to show error messages in a pop up window?
Dirk- did you look at javascript alert? viel Glueck, -Martin ----- Original Message ----- From: "Dirk Manske (Service Respond)" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, January 22, 2004 9:10 AM Subject: how to show error messages in a pop up window?
Hi,
I would like to display error messages in a popup window instead of the actual form page.
Something like if <logic:messagesPresent> is true, pop up a window and
show
the error messages.
Has anyone done something similar to this and could show me an example?
Thx, Dirk
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]