when closing modal window i want to send command back to site (callback)

when closing modal window i want to send command back to site (callback)

Hi

I have a grid, and i want to have modal window to open when i click "edit" on particual row, in this form i have "submit" and "cancel" and when i press submit i want to send a command like "javascript:refresh()" which refresh the grid and show the changes. But when i press cancel it just acts like i did a "closewindow()" command.


Do you know of any of the examples of all the jQuery modal window out there do this things?