Mouse events on clickable control image
I'm in the process of contemplating rewriting some JavaScript code I have into an AW format.
One of the things I want to do is handle mouse events on an image in an input field. I more or less have this working with the following code -
While this works with the image setEvent() call, I can't seem to get it to work with the onControlClicked call.
Can anyone give me any pointers?
One of the things I want to do is handle mouse events on an image in an input field. I more or less have this working with the following code -
<html>
<head>
...
<style>
#myInput .aw-item-image {cursor:pointer; position:absolute; right:-5px; margin-top:-2px}
#myInput .aw-item-text {left: 1px; width:80px}
</style>
</head>
<body>
<script>
var obj = new AW.UI.Input
obj.setId("myInput")
obj.setControlText("Find")
obj.setControlImage("search")
var img = obj.getContent("box/image")
img.setEvent("onclick", function(event)
{
alert("Hello")
event.cancelBubble = true
})
document.write(obj)
/*
img.onControlClicked = function(event)
{
alert("Hello")
}
*/
</script>
</body>
</html>
While this works with the image setEvent() call, I can't seem to get it to work with the onControlClicked call.
Can anyone give me any pointers?
Anthony
December 10,