I am a dojo beginner and am trying to work with a dijit.form.Button to display a selected document and compute the appropriate xPage to display. The button is on a custom control and will work on documents contained in a view control on an xPage to display in the Notes client. I’m confused by the differences in syntax I find across the web and in books with respect to dojo.
I understand from the wiki that we are supposed to use the dojoAttribute now to indicate display attributes.
And I believe that the execution information is put under eventHandler, but in some scripts I have seen code like this:
<xp:eventHandler event=“onclick” submit=“true” refreshMode=“complete”>
<xp:executeScript
script= “#{javascript:…}”>
</xp:executeScript>
</xp:this.action>
</xp:eventHandler>
and code like this: xp:executeScript xp:this.script<![CDATA[#{javascript:…"
}]]></xp:this.script> </xp:executeScript>
</xp:this.action>
</xp:eventHandler>
and then really simple script like this (from a tutorial):
OK
function showEvent(theEvent) {
alert("Event " + theEvent.type);
}
So my question is - where do we put the event that is to execute when the button is clicked?
I apologize if this is quite a basic concept to grasp, but I want to make sure that I learn correctly, and don’t program something which will not work with most browsers.
Thank you so much for any clarification you can provide.