And finally the solution is using a very simple javascript code:
<script> parent.location = "blah.php" </script>
what you should do is when a submitted form in an iframe, you will need to "echo" your thank you page with that piece of code.
I hope this will help some people who still use custom PHP form in their CMS website.