how to close Modal control application via button

i want to crate a button to close a modal-opened control application, just simple close… i don’t want to use the exit button comes with it.
created php button and tried sc_redir, sc_exit with all their functions, nothing worked as required
any simple solution for this?

Thanks Albert
sc_exit didn’t work as supposed to, nor sc_redir options… i simply wanted to close the modal form, only… like cancel, without using the buttons of the toolbar

this worked, by jsb, simple and straight forward


The links do not work anymore. Could you share your solution?

I think this is the link reference above: