Hi,
You will not be able to atach any client side JavaScript to a button that has been set to the dialog's AcceptButton. Once the button is set as an AcceptButton, the dialog would hijack the button and make its only purpose to be closing the dialog.
In your case, you want to clear the AcceptButton property first. Then change your dialres() function to something like this:
Code: JavaScript
function dialres()
{
//do the work you were previously doing in this function
......
//close the dialog
eo_GetObject("Dialog1").close();
}
Thanks