On Wednesday, April 04, 2007 10:15 AM Erik Beeson <> said: > TB_remove() closes the thickbox, but you need to call it from the > context of the top window, not the inner iframe window. So you > probably want to do something like parent.TB_remove() on the last > page. Or, if you want to remove the thickbox and update the underlying > page, you might want to just do a full refresh with > window.location.reload(true). If you want to close the thickbox and do > some ajax stuff, you might want to have your last page call a function > on your main page that will do those things: > On the main page: > function thickboxDone() { > TB_remove(); > $.ajax(...); > } > > Then call parent.thickboxDone().
I'm not sure that I'm following you completely. Where do I put the call for thickboxDone()? What I'm confused about is how the first page (that is loaded in the TB) can have control even after the form has been submitted to a different page. Do I need to add an onsubmit handler to the form that runs thickboxDone() as a callback? It's all dependent on what the processing page does. If there are errors in the form it will redirect to form page to show the user errors. If the form is clean it will do some database work and then redirect to the parent page. In the latter case the TB should close but not the former. (I hope I'm making sense.) Thanks, Chris.