0

javascript in toolbarbutton in a controller

asked 2010-01-21 11:01:04 +0800

AllenFox gravatar image AllenFox
159 4

Hi,
I'm using jsp tags. Is it possible to do something like "javascript: document.getElementById('elementOutsideZkPageId')" on a zk toolbarbutton click? I add the button in a controller.
Thanks.

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2010-01-22 03:37:22 +0800

AllenFox gravatar image AllenFox
159 4

what i want is to do something like

<z:page>
    <z:listbox id="lb"/>
    <z:toolbarbutton onclick="lb.visible=false"/>
</z:page>
....
<span id="sp" style="display:none;">
</span>

and also to make a span visible on toolbarbutton click.

link publish delete flag offensive edit

answered 2010-01-22 08:58:31 +0800

kesavkolla gravatar image kesavkolla
180 3

you can add a client side event to do that. The following should work

<z:toolbarbutton onclick="lb.visible=false">
<attribute w:name="onClick" xmlns:w="http://www.zkoss.org/2005/zk/client">
jq("$sp").show();
</attribute>
</z:toolbarbutton>

link publish delete flag offensive edit

answered 2010-01-26 06:12:30 +0800

AllenFox gravatar image AllenFox
159 4

updated 2010-01-26 06:13:26 +0800

Thanks for your answer. Isn't it only for version 5.0? I think yes, it is. I'm using 3.6.3:(

link publish delete flag offensive edit

answered 2010-01-26 18:19:27 +0800

tao5241 gravatar image tao5241
3

tttttttt

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-01-21 11:01:04 +0800

Seen: 402 times

Last updated: Jan 26 '10

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