try this ...

errors.header   =alert(
errors.prefix  ="
errors.suffix  ="+ "\\n" +
errors.footer   ="");\n

...
<script>
    function load() {
        <html:errors />
    }

</script>
...
<body onLoad="load">
...

it should work but it won't because of
http://issues.apache.org/bugzilla/show_bug.cgi?id=17418
so you need to hack org.apache.struts.taglib.html.ErrorsTag

Feky

----- Original Message ----- 
From: "Anurag Garg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, June 13, 2003 7:27 AM
Subject: <html:errors /> tag in javascript alert


> Hi,
>
> I want to display the validation error message from ActionForm in
javascript
> alert box, ragther than displaying on my jsp page.
> I am doing it in a javascript function at page load time like this,
>
> alert(<html:errors />)
>
> But i am getting the java script error saying "Object expected". Any
> solution for this problem..
>
> Thanks,
> Anurag Garg
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to