how to redirect parant page from ifram using javascript

This is good question, in fact. In the project, the system reads a file and display the content within iframe of a page. The problem is sometimes, the file is not there or the file does not have any content. Then I need to display error message, not inside of the iframe, but on the parent page.

This script is from how to redirect parent page from iframe page_load

47 if (self.parent.frames.length != 0)

48 {{

49 self.parent.location = ‘{0}’;

50 }}

how to redirect parant page from ifram using javascript

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s