Hi
I am assuming, on clicking the OK button on the page you want to perform some business logic.
If this is the case, then you can use the OnQueryClosePage trigger of that page. Here you will have CloseAction, which tells you what is the action performed to close the page.
If the page has opened in lookup mode, then you have you use Actions like
IF PageVariable.RUNMODAL = ACTION::OK THEN BEGIN
// Business Logic
END;
Regards
Avinash B