You seem to be confusing client-side and server-side scripts. Any scriptlets in the
page will be executed as soon as the JSP engine encounters them, never in response
to a user's action. And since the contents of a <%...%> tag are never sent to the
client, your event handler will be empty. If you must handle an event on the client
side then you have no choice but to use JavaScript.


koh hong kiat wrote:

> Is there a limitation to where i can append a <%... %> in the JSP file.
>
> If I captured an event, say onClick="", can I append <%... %> in it ?
>
> E.g.
>     <A HREF="file.jsp" onClick="<% classA.setValueA(1); %>" >Text</A>
>
> Thank you for your help.
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to