Good afternoon,
I’m struggling to do what I thought would be a simple redirect but it’s not working as I’d expect it to. When I add a user in my application, the Add User form pops up in a Modal view. I then enter all the information necessary, and when complete, want to Save/Insert the record, close the form and then open up a grid where I can add some other information that ties to the new user (I’m pulling their User info into the grid with variables). While the redirect is working, it’s redirecting to the grid inside a Modal window which looks horrible. I don’t want it in a Modal window because it doesn’t fit and looks ugly.
So how do I have the Add User (or Edit User) form close out completely after the insert and then redirect to a grid to add some other information for the user? What I have now (that keeps opening in Modal) is this: sc_redir(‘mygrid.php’);
FWIW: For simpler testing, I put this code in the OnAfterUpdate so that I didn’t have to keep inserting a full user profile on each test, and then simply made a small change and then saved it:
echo “<script type=‘text/javascript’>”. “window.close();”. “</script>”;
– Did not close out Add User Modal
echo “<script>window.parent.tb_remove();</script>”;
– Did not close out Add User Modal
sc_exit©;
– Spun and didn’t do anything
sc_exit();
-- Spun and didn’t do anything
Any idea on how to force the Modal window completely shut and then redirect to my grid?
Thanks very much,
Mark.