Redirect If The Page Is Iframe
Here is what i want to do: in my blog, comments are shown in a fancybox popup using iframe. (eg:- for the post number 2, comments link open an iframe fancybox comments.php?id=2) I
Solution 1:
Put this script in your page. If it is not opened in a frame, it will redirect to post.php?id=...
<scripttype="text/javascript">if (parent.location==location) {
location.href = "post.php" + location.search;
}
</script>
Post a Comment for "Redirect If The Page Is Iframe"