Forum Moderators: open

Message Too Old, No Replies

How to display pop-up window/alert initiated by iframe

How to show pop-up/alert initiated by iframe in parent window?

         

gcan

10:35 am on Jul 9, 2009 (gmt 0)

10+ Year Member



Hello,

I have an 1x1 px iframe on my website. If user is logged in, but doesn't show any activity, the content of the iframe refreshes every 10 minutes. One of the purposes of this iframe is to check for new messages and inform user with sound/message if there are new messages.

The problem is that user can not see any message because it's being displayed in the iframe and not in the parent window.

I need any solution how to display in parent window a message/pop-up/alert etc initiated by iframe.

Thanks.

gcan

2:03 pm on Jul 9, 2009 (gmt 0)

10+ Year Member



Found solution. I have to use:

window.parent.window.alert

instead of:

window.alert

tedster

6:06 pm on Jul 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for explaining what you found - yes, that makes perfect sense.