You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by am...@worldbank.org on 2004/02/03 01:29:40 UTC
calling javascript on onsubmit
My HTML template has a javascript and I check the form values on "onsubmit"
eventHandler.
My validator in the same page removes the onsubmit which I have explicitly
written.
Hence my validation doesnt happen.
How can I add my validation with the Tapestry validator code.
Code Snippet
<form jwcid="form" onsubmit="return showAlert()">
<INPUT type=Submit value="Submit" onClick="javascript:setApprovalClicked
()" jwcid="submitApproval" />
Thanks,
Arun
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: calling javascript on onsubmit
Posted by Harish Krishnaswamy <hk...@comcast.net>.
You have to write a script specification. Please see the Tapestry FAQ in
the wiki for "Script How and Why". There are also examples in the vlib demo.
-Harish
amanivachagam@worldbank.org wrote:
>My HTML template has a javascript and I check the form values on "onsubmit"
>eventHandler.
>
>My validator in the same page removes the onsubmit which I have explicitly
>written.
>
>Hence my validation doesnt happen.
>
>How can I add my validation with the Tapestry validator code.
>
>Code Snippet
>
> <form jwcid="form" onsubmit="return showAlert()">
> <INPUT type=Submit value="Submit" onClick="javascript:setApprovalClicked
>()" jwcid="submitApproval" />
>
>Thanks,
>Arun
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org