Forum Moderators: open
Thanks,
GMan
I have a website with multiple pages that load in an iframe on the main page, but I don't want users to be able to access the pages without them being in the iframe of the main page and basically I want to force the pages to open in the main page if it is access directlyright now on each page I have this code:
<script type="text/javascript">
if(top.location == self.location)
{
top.location.href = 'my main page'
}
</script>this works to get them to the main page, but I want the page the user directly accessed to be open in the main
any help would be greatly appreciated
Thanks,
ryanc
<script type="text/javascript">
if ((top.location == self.location) &&!(window.opener))
{
top.location.href = 'my main page'
}
</script>
In fact you could probably get rid of checking top.location == self.location althogether for your popup pages, as that condition would always be true for them.