title: Call Eventhandler from ClientSide JS
body: <p>I was looking at this post by Jeremy Hodge
  <a href="http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC" rel="nofollow">http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC</a> 
  With Event handlers and calling them from ClientSide JS.
  But I can get them to work if I put some SSJS in side the event I would like to fire.</p>
  
  <p>Does this still work or am I doing something wrong?</p>
  
  <pre><code>    &lt;xp:button value="click me" id="button1"&gt;
          &lt;xp:eventHandler event="onclick" submit="true"
              refreshMode="complete"&gt;
              &lt;xp:this.script&gt;&lt;![CDATA[executeOnServer('dostuff');]]&gt;&lt;/xp:this.script&gt;
  
          &lt;/xp:eventHandler&gt;
      &lt;/xp:button&gt;
      &lt;xp:eventHandler event="onfubar" id="dostuff" submit="true"&gt;
          &lt;xp:this.action&gt;&lt;![CDATA[#{javascript:print("1");viewScope.data="Y"}]]&gt;&lt;/xp:this.action&gt;
      &lt;/xp:eventHandler&gt;
  </code></pre>
  
  <p>The executeOnServer function comes directly from Jeremys page</p>