Menu

#798 JavaScript utils: comm.sendClick and comm.sendUser

3.0.5
closed
nobody
5
2014-04-17
2008-04-25
Tom M. Yeh
No

To simplify the sending of events to the server.

<html onClick='l.value = "onClick "+event.area'
onUser='l.value ="onUser "+org.zkoss.lang.Objects.toString(event.data)'><![CDATA[
<a href="javascript:;" onclick="action.onClick(this, 'Hi')">onClick with Hi</a>
<a href="javascript:;" onclick="action.onClick(this)">onClick with null</a>
<a href="javascript:;" onclick="action.onUser(this)">onUser with null</a>
<a href="javascript:;" onclick="action.onUser(this, 'One')">onUser with One</a>
<a href="javascript:;" onclick="action.onUser(this, 'One', 'Two')">onUser with [One, Two]</a>
]]></html>

Discussion

  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25

    Logged In: YES
    user_id=91099
    Originator: YES

    Ready since 4/25

     
  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25
    • status: open --> closed
     
  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25
    • summary: JavaScript utils: actiion.onClick and action.onUser --> JavaScript utils: actiion.sendClick and action.sendUser
     
  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25

    Logged In: YES
    user_id=91099
    Originator: YES

    Test Ccodes:
    <window title="Test of JavaScript Utilities">
    <html onClick='l.value = "onClick "+event.area'
    onUser='l.value ="onUser "+org.zkoss.lang.Objects.toString(event.data)'><![CDATA[
    <a href="javascript:;" onclick="action.sendClick(this, 'Hi')">onClick with Hi</a>
    <a href="javascript:;" onclick="action.sendClick(this)">onClick with null</a>
    <a href="javascript:;" onclick="action.sendUser(this)">onUser with null</a>
    <a href="javascript:;" onclick="action.sendUser(this, 'One')">onUser with One</a>
    <a href="javascript:;" onclick="action.sendUser(this, 'One', 'Two')">onUser with [One, Two]</a>
    ]]></html>
    <separator/>
    <label id="l"/>
    </window>

     
  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25

    Logged In: YES
    user_id=91099
    Originator: YES

    <window title="Test of JavaScript Utilities">
    <html onClick='l.value = "onClick "+event.area'
    onUser='l.value ="onUser "+org.zkoss.lang.Objects.toString(event.data)'><![CDATA[
    <a href="javascript:;" onclick="comm.sendClick(this, 'Hi')">onClick with Hi</a>
    <a href="javascript:;" onclick="comm.sendClick(this)">onClick with null</a>
    <a href="javascript:;" onclick="comm.sendUser(this)">onUser with null</a>
    <a href="javascript:;" onclick="comm.sendUser(this, 'One')">onUser with One</a>
    <a href="javascript:;" onclick="comm.sendUser(this, 'One', 'Two')">onUser with [One, Two]</a>
    ]]></html>
    <separator/>
    <label id="l"/>
    </window>

     
  • Tom M. Yeh

    Tom M. Yeh - 2008-04-25
    • summary: JavaScript utils: actiion.sendClick and action.sendUser --> JavaScript utils: comm.sendClick and comm.sendUser
     

Log in to post a comment.