redirect parent page from an iframe (based in DotNetNuke)

hi all,

our main site runs on DotNetNuke so the application i'm writing works within a viva.iframe within one of the pages.

I have set the timeout to 30 mins but when this expires (ie. session variables blank) i want to redirect the main page to the login page.

Is there an easy way to redirect the parent of an iframe, also has anyone had any knowledge working this with DotNetNuke as i tried a little test using a javascript function (parent.location.href='page.asp') but this didn't work.

I've managed to get it to detect when the session has timed out but my initial obvious redirect opened the entire site within the iframe (like it would).

Thank you
Who is Participating?
flipzConnect With a Mentor Commented:
If you want to redirect the topmost frame then use top.location.href='page.asp'.
bhendrickAuthor Commented:
thats exactly what i was looking for, brilliant thankyou.... something so simple yet so effective
No problem - glad to be of help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.