0

ZK in JSP pages

asked 2010-04-15 08:24:42 +0800

mako gravatar image mako
60 1 2

updated 2010-04-15 08:26:05 +0800

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")%>";

which causes troubles too.

Thanks for help.

Mako

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-04-19 03:22:47 +0800

mako gravatar image mako
60 1 2

Nobody has an idea ?

If not, is it possible to have access to HTML components from ZK ones ?


Mako

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-04-15 08:24:42 +0800

Seen: 502 times

Last updated: Apr 19 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More