I was looking at this post by Jeremy Hodge http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC 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.
Does this still work or am I doing something wrong?
<xp:button value="click me" id="button1">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.script><![CDATA[executeOnServer('dostuff');]]></xp:this.script>
</xp:eventHandler>
</xp:button>
<xp:eventHandler event="onfubar" id="dostuff" submit="true">
<xp:this.action><![CDATA[#{javascript:print("1");viewScope.data="Y"}]]></xp:this.action>
</xp:eventHandler>
The executeOnServer function comes directly from Jeremys page