-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'd like to know if it's possible to use javascript defined in a JSP's script with ZK components. What I mean is :
- I've got a JSP file, with some javascript functions defined in a script at the beginning.
- I use ZK components in my JSP page, using taglib
- What I want is to use the javascript's functions defined previously when I click my button for instance. Is it possible, and if so, how ?
This is what my .jsp looks :
<%@ taglib URI="..." prefix="zk"%> <HTML> <HEAD> <script> function a() { } function b() { } function c() { } </script> <!-- HTML tags --> ... <zk:page zscriptLanguage="javascript"> <zk:button label="MyButton" onClick="a()"/> <zk:page/> <!-- HTML tags --> ... <HEAD> <HTML>
I try to put the fonctions into a zscript using javascript, but there are troubles. First, it doesn't recognize the object document. Plus, there are that kind of thing in the javascript's functions :
var isManager = "<%=session.getAttribute("isManager")%>";
Thanks for help.
Mako
Asked: 2010-04-15 08:24:42 +0800
Seen: 502 times
Last updated: Apr 19 '10