You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Anthony E. Carlos" <an...@digitalphenom.com> on 2004/09/25 00:06:25 UTC

[veltools] $validator.javascript sometimes erratic

Hello,

Has anyone noticed that $validator.javascript (In a Struts environment) 
sometimes renders the starting and ending <script> tags, and sometimes 
doesn't? The result is that instead of it just being javascript, it 
renders the javascript as text on the page.

I checked earlier in my page to make sure that $validator.htmlComment 
returns true, and it does.

The weird thing is that the tool works beautifully on a few pages. 
However, one page works differently.

Has anybody run into this or have a solution?

Thanks,

-Anthony Carlos


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: [veltools] $validator.javascript sometimes erratic

Posted by Andrea Sponziello <an...@unile.it>.
I had the same problem and ( if I remember correctly) it was caused by wrong
form initialization. I also was tinking It was a random behavior but it 
wasn't.

for example if your formbean is called "formLogin" and you call

$validator.getJavascript("formLoginXXXX")   ##wrong form name

you see the javascript without the <script> tags fired in the rendered 
page....

Andrea


Anthony E. Carlos wrote:

> Hello,
>
> Has anyone noticed that $validator.javascript (In a Struts 
> environment) sometimes renders the starting and ending <script> tags, 
> and sometimes doesn't? The result is that instead of it just being 
> javascript, it renders the javascript as text on the page.
>
> I checked earlier in my page to make sure that $validator.htmlComment 
> returns true, and it does.
>
> The weird thing is that the tool works beautifully on a few pages. 
> However, one page works differently.
>
> Has anybody run into this or have a solution?
>
> Thanks,
>
> -Anthony Carlos
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org