Wednesday 7 May 2014

Using button event to execute a hiperlink click .


  • <zk>
  •   <window border="normal" title="hello">
  •   
  •     <div id="d">Welcome to ZK Fiddle , run it right now!</div>
  •   
  •     <button id="btn" label="Click me to trigger anchor click">
  •      <attribute name="onClick">
  •         A a = new A();
  • a.setHref("tel:123456789");
  •           a.setStyle("display: none"); //hidden
  •           d.appendChild(a); // be child, or the element is not found by jquery
  •           Clients.evalJavaScript ("var a = jq ('#" + a.getUuid () +"').get(0); a.click(); "); // should use get(0)
  •         </attribute>
  •     </button>
  •   </window>
  • </zk>


No comments:

Post a Comment