atari37
04-13-2007, 06:35 AM
I'm working on a company's department webpage (pages that monitor datacenter equipments), I have one index.html file with menus on the left_nav, and iframe in the body. Now, when I click on a menu item (link), it is supposed to open that page in my iframe. It works for most of the pages but one of the links open in a new window even though the target is the name of my iframe. So I looked at the source code for that page and didn't like what I saw, there's a script (see below) in there to prevent the page from opening in an iframe so my question is "How do I override this?" PLEASE help. These pages are like the index pages that come up when you type your routers ip address in a browser so I doubt that it can be edited.
Note: It will be very easy to comment out the script but I don't have access to the file.
<script language="JavaScript" type="text/javascript" >
// This script makes sure that our top level frame is not within
// some unknown frame which may mess up the viewability due to it
// being smaller than we need. This would be useful if someone
// else has a link to this page within a frame window.
if (parent.location != self.location)
{
parent.location = self.location.href
}
Note: It will be very easy to comment out the script but I don't have access to the file.
<script language="JavaScript" type="text/javascript" >
// This script makes sure that our top level frame is not within
// some unknown frame which may mess up the viewability due to it
// being smaller than we need. This would be useful if someone
// else has a link to this page within a frame window.
if (parent.location != self.location)
{
parent.location = self.location.href
}