Assigns the HTML event handler.
nullobj.setEvent(name, value);
name (string) - event name
value (string or function) - event handler function
obj.setEvent("onclick", myClickHandler);
It is possible to pass a literal javascript code (string) as the value parameter. In this case the code will be simply put into the html attribute -
obj.setEvent("onclick", "alert(this.id)");
It will produce -
<div id="aw123" onclick="alert(this.id)" >...</div>
But more often the value parameter is an event handler function.
obj.setEvent("onclick", function(event){...});
In this case AW will catch the event, find the original AW object and call the event handler as a method of this object with the event as an argument.
getEvent() method