Kay, ya know what? I'm not even gonna bother waiting for a response on that comment.
There is no magic solution to this problem. No code snippet will suffice. This question is purely conceptual, and you have a concept left to learn.
The concept here is how to make Javascript and server-side coding work together to your advantage. They are two vastly different creatures, and performing client-side tasks from the server-side WILL NOT WORK.
There are many different approaches to this issue. Let's say that (since you gave no details whatsoever) that once a form is submitted in the thickbox, you wish to close the thickbox. Fair enough. My approach would be to create a close_this_thickbox()
function, have it lying around in my .js file, then, once the form is submitted, to have the resulting page print <script>close_this_thickbox()</script>
.
(The cleaner solution for the end user would likely be to have the form submit via AJAX, then have close_this_thickbox
as a callback, but that sounds slightly too fancy for this discussion here.)
An approach similar in concept to the above is the only way to get the desired effect. You must create client-side code, then have the server side print an invocation of said code.
As for server-side redirection applying to the whole window, again, such can not occur without the same approach. Instead of using your built-in server-side redirect methods, you must invoke a piece of script that results in the effect you want, e.g. <script>top.location = 'http://example.com'</script>
. No server-side solution is possible.
Here's hoping that you can successfully apply this concept, and best of luck in your web development journey. Anything need clarification?