You might want to try something along this line
public function Init(element : Object, args : Object, controller : Object, debug : Object) {
var content : Object = controller.RenderEngine.Content;
textBoxlotref1Element =ScriptUtil.FindChild(content, "WLBREF");
this.debug=debug;
textBoxlotrefElement.add_Click(getValue);
}
function getValue(sender, e : EventArgs) {
}