Jump to content


[SOLVED] JAVASCRIPT - Parent Windows


4 replies to this topic

#1 Jackdawhouse

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 29 March 2008 - 12:18 AM

Hello.

I have an iframe which uses a meta refresh every 30 seconds. Inside the iframe, it has a javascript which shows a popup.

BUT

the popup shows in the iframe, not the parent window.

How can I make the popup load in the parent window/main window from the iframe?

Thanks!

SOLVED: I simply used AJAX instead of an iframe! Thanks.

Edited by Jackdawhouse, 12 April 2008 - 12:25 PM.


#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 March 2008 - 12:24 AM

The popup window is literally opening inside of the iframe? As in window.open() opens inside the iframe? I didn't even think that was possible...

Maybe one of these will help you:
http://www.google.com/search?q=iframe+pare...ndow+javascript

:biggrin:

#3 Jackdawhouse

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 29 March 2008 - 12:29 AM

Sorry, I wasn't that specific:

Basically, I have this "post it note" script: from http://www.javascrip...t2/postit.shtml
That is in my iframe.

What I want to do is when the page on my iframe loads <body onload=...>, the post it note will load OUTSIDE of the iframe (in the main window).

Thanks for your speedy response!

Edited by Jackdawhouse, 29 March 2008 - 12:30 AM.


#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 29 March 2008 - 12:36 AM

speedy = coincidence :yodasearch:

Put all of the JavaScript/CSS provided in that tutorial in the parent window (outside of the iframe), and then simply call the showit() function like so:
<body onload="parent.showit();">
Should theoretically work.

#5 Jackdawhouse

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 29 March 2008 - 12:55 AM

Nope, didn't work :yodasearch:

Is there a way where I can edit the code so when it popups onload, it pops up in the parent window?

Edited by Jackdawhouse, 29 March 2008 - 12:55 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users