954,606 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Focus on Parent Frame from within iFrame

I want to focus back on the main page from an iFrame that is loaded as an element on the page. I am trying to make a toggle focus using CTRL to go between the two. I am using javascript to navigate the iFrame to different pages.

Once the iFrame has focus, I can't get it to focus on the parent document. Any ideas?

brinegart
Newbie Poster
2 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Per the discussion in this site you might be able to achieve what you're looking for with one of the following:

top.focus()
parent.focus()


Apparently, however, this will not work in Internet Explorer.

It appears that there are a number of items within the iframe framework that do not work properly with IE however. Unless your target audience is guaranteed not to be using IE for their browsing I would possibly look into alternatives to the iframe construct.

Lusiphur
Posting Shark
Team Colleague
966 posts since Jun 2010
Reputation Points: 207
Solved Threads: 127
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: