How to Open Office Live iFrames in a New Window

An HTML iFrame displays a secondary Web page within a main container HTML page. Using JavaScript, you can break out of the main container page and display the iFrame page in a new window. The iFrame opens in a new window or tab, so users can navigate the iFrame page without viewing the container page. This code is beneficial if your content is framed in another website's pages.

Instructions

    • 1

      Open a browser to the Office Live home page. Log in to your Office Live account and click "Web Site" to view your current website files.

    • 2

      Click "Edit" next to the Web page you want to edit. You want to edit the iFrame page, so you can break out of the frame and open the page in a new window.

    • 3

      Add the following code to the top of the iFrame file:

      <script type="text/javascript">
      if (top.location!= self.location) {
      window.open = self.location.href
      }
      </script>

    • 4

      Click "OK" to save the changes. Open the Office Live page that contains the iFrame. The iFrame page opens in a new window.

Related Searches:

References

Resources

Comments

Related Ads

Featured