Hi there, When I try to click the button it says "this.button.id is null or not an object" At the time the buttonclick function executes, the this keyword refers to the button object, not the objHelper. And the button object certainly does not contain any button member, so the this.button is undefined, then it should raise the error when you are accessing the this.button.id. If I do onclick="objHelper.buttonclick" in the "input type=button" tag instead it works fine Now you invoke the function buttonclick of the objHelper object, so the this keyword in the function should refer to the objHelper, and as a result it should be working as you expected. To work around, you can simply change a bit your sample code:
this.buttonclick = function()
{
//alert(this.button.id);
alert(this.id);
};