faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 5 people (60%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

how can i address a function within a frame of a popup window?

Jun 24th, 2002 12:19
Jean-Bernard Valentaten, dan levin,


That should be quite easy.
First you need to acess the popup, then the frame and finally the 
function. This shuld do the trick:
var response = '';
var myPopup = window.open('http://some-
url', 'Popup', 'scrolling=true,width=100,height=100')
response = myPopup.frame[0].myFunction();
Of course you will need to implement a timer checking whether your 
frame in the popup has been loaded completely, but I'm sure you'll 
figute out how to accomplish this.
In case you don't succeed, send a short e-mail and we'll figure it out.
HTH,
Jean