You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jose Ramon Diaz <jo...@aranzadi.es> on 2003/02/20 13:24:42 UTC
javascript alert with the content of
Hi all,
I would like to get a javascript alert with the content of <html:errors/>,
so I tried this in the JSP:
...
<script>
alert('<html:errors/>');
</script>
...
But the HTML code generatd is the following,
<script>
alert('MESSAGE OF HTML ERROR TAG
');
</script>
So, it writes a "\n" at the end of the message, and the javascript fails.
I´ve seen org.apache.struts.taglib.html.ErrorsTag.java, and after every
message it writes "\r\n" and I don´t see any way to override this behaviour.
Should I change my struts source files? Is there any other way to get a
javascript alert with this content?
Would be interesting for this class to be able to write or not to write the
"\n"´s?
thanks a lot...
Jose R. Díaz
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org