You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by matt22 <s1...@zoznam.sk> on 2010/06/08 09:34:31 UTC
OnEvent Problem
I am using ck/onEvent in template file:
<select t:type="select" t:mixins="extra/OnEvent" event="change"
onCompleteCallback="myOnCompleteFunction" .../>
......
<script type="text/javascript">
<!--
function myOnCompleteFunction()
{
if(true && true)
$('sendEmailLoadingIcon').hide();
}
-->
</script>
-------------
Without <!-- --> tags i get Tapestry template formatting exception:
[com.ctc.wstx.exc.WstxLazyException] Unexpected character
'&'...
With <!-- --> tags i get Prototype exception:
...function is not defined.
hmmmm....
HOW TO SOLVE IT?
--
View this message in context: http://old.nabble.com/OnEvent-Problem-tp28814299p28814299.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: OnEvent Problem
Posted by Inge Solvoll <in...@gmail.com>.
The formatting is caused by the &&, which are special XML chars that
tapestry templates don't like.
The best solution is to provide your static javascript in a file that is
included with @IncludeJavascriptLibrary, not include it inline like this.
If you want to keep your solution, putting this at the top of your template
will probably fix your formatting exception problem:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
On Tue, Jun 8, 2010 at 9:34 AM, matt22 <s1...@zoznam.sk> wrote:
>
> I am using ck/onEvent in template file:
>
> <select t:type="select" t:mixins="extra/OnEvent" event="change"
> onCompleteCallback="myOnCompleteFunction" .../>
> ......
> <script type="text/javascript">
> <!--
> function myOnCompleteFunction()
> {
> if(true && true)
> $('sendEmailLoadingIcon').hide();
> }
> -->
> </script>
> -------------
> Without <!-- --> tags i get Tapestry template formatting exception:
> [com.ctc.wstx.exc.WstxLazyException] Unexpected character
> '&'...
> With <!-- --> tags i get Prototype exception:
> ...function is not defined.
>
>
> hmmmm....
> HOW TO SOLVE IT?
> --
> View this message in context:
> http://old.nabble.com/OnEvent-Problem-tp28814299p28814299.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>