Thanks for your help. Just for the sake of curiosity, what would the syntax be if we were to pass two variables to the function? Or are we supposed to pass an array object?
oButton.attachPress(HandleButtonClick , oDialog1, oDialog2 );
function HandleButtonClick()
{
this.close(); // this -> oDialog // What would the syntax be???
}
Thanks again guys.