OK. I know I can do this using the .add_close() method on the client-side event.
However, I need to add the function in such a way as to allow me to access objects from the calling functio9n in the callback function. So, I have something like this...
"<%= GlobalConstants.CommandName.REQUESTINVITE %>"
wnd = $find(
args = e.get_argument();
AjaxRequestObject = GetAjaxRequestObject(action,
AjaxRequestObject.AppointmentId = ID;
AjaxRequestObject.HideInvite = args.HideInvite;
AjaxRequestObject.SpecialNotes = args.SpecialNotes;
And this seems to work just fine.
The server-size code, invoked by my AjaxRequestJson() call is executed multiple times if the window is opened multiple times.
Now, if I were doing this in the more traditional way (with the callback function being a standalone function) I'd just call remove_close(functionname) in the callback function itself.
So, to the question: what do I pass to the remove_close() function to prevent multiple copies of the nested function from being called?