Scriptcase JavaScript Close Modal Form
SCRIPTCASE close modal form
I’d try this.
Create a JS function in the app OnLoad event:
echo "<script>
function close_modal()
{
window.parent.tb_remove();
}
</script>
";
In the ajax button code, trigger the close_modal function via the sc_ajax_javascript macro:
sc_ajax_javascript('close_modal');
NOTES
The JS function could be implemented as an external library so that you have a centralized version to manage in case you need to edit it; being a one line function, I don’t know if it’s worh the effort.
SC has also other ways to create JS functions inside individual form apps: “Form Settings \ JavaScript” or “Programming \ JavaScript Methods” but usually I don’t use them so I don’t know if the above suggestion would work.
Elated Eagle