Steps create client delegate:
- Create client delegate by using Function.createDelegate(this, functionName)
- Add the new delegate into $addHandler(this, newDelegate)
Example:
function pageLoad() {
var clickDelegate = Function.createDelegate(this,onButtonClick);
$addHandler($get('btnTest'),'click',clickDelegate);
}
function onButtonClick()
{
alert(“inside button click”);
}
Join the conversation! Your thoughts help the community grow.