HighDots Forums  

Send Value To Parent From IFrame

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Send Value To Parent From IFrame in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
spambuster@omar-inexile.com
 
Posts: n/a

Default Send Value To Parent From IFrame - 10-02-2007 , 05:02 PM






I have an IFrame embedded in a layer in the main page. Everything in
the IFrame is loaded dynamically. I can't seem to be able to locate
the IFrame using document.getElementByID. Probably because it is
buried in layers within a layer. I have a string variable that I would
like to pass to the parent page. I've searched for days now, and I
find tons of stuff that kind of points in the right direction, but
nothing works. I have no forms, just a single string variable that is
created when the IFrame is loaded.

I want to pass that variable from the IFrame to the parent page, but
I'm stumped.

I've seen code with dozens of lines that may or may not do this, but
there has to be a simple way.

Can someone help?

Reply With Quote
  #2  
Old   
Norman Peelman
 
Posts: n/a

Default Re: Send Value To Parent From IFrame - 10-29-2007 , 10:49 PM






spambuster (AT) omar-inexile (DOT) com wrote:
Quote:
I have an IFrame embedded in a layer in the main page. Everything in
the IFrame is loaded dynamically. I can't seem to be able to locate
the IFrame using document.getElementByID. Probably because it is
buried in layers within a layer. I have a string variable that I would
like to pass to the parent page. I've searched for days now, and I
find tons of stuff that kind of points in the right direction, but
nothing works. I have no forms, just a single string variable that is
created when the IFrame is loaded.

I want to pass that variable from the IFrame to the parent page, but
I'm stumped.

I've seen code with dozens of lines that may or may not do this, but
there has to be a simple way.

Can someone help?
Have you simply tried...

create variable in main page:

var my_variable = new Array(); // for example


....then from the HTML document loaded in the IFrame:

parent.my_variable[0] = 'zero';


Norm


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.