call zscript function from javascript

asked 2012-02-02 10:22:23 +0800

aks gravatar image aks


I want to call zscript function from javascript...
Is it possible ? if yes then how to call zscript function from javascript? what is proper way to do so..

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-02-04 05:03:19 +0800

matthewgo gravatar image matthewgo

Hi aks,
Here is a simple sample:

<zk xmlns:w="client">
 <script type="text/javascript"><![CDATA[
  var s = '<label><attribute name="onCreate">System.out.println("test");self.detach();</attribute></label>';
 <div id="cmd">
 <textbox id="tb" value="x">
  <attribute name="onFocus">
   Executions.createComponentsDirectly(self.getValue(), null, cmd, null);
 <button label="click me" w:onClick="zk.Widget.$(jq('$tb')).setValue(s);zk.Widget.$(jq('$tb')).fireOnChange()" />

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




Asked: 2012-02-02 10:22:23 +0800

Seen: 153 times

Last updated: Feb 04 '12

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