I have a page with an <iframe>, and inside that <iframe> another <iframe> pops up as a window. What I'm trying to do is call a function that is set in the <iframe>'s <iframe>.... I know, lot's of the same tag going on.
Here's what I mean in HTML format.
<body>
<iframe src="blahblah.html" name="iframe">
//blahblah.html html
<iframe src="blahblahpopup.html" name="iFrame2">
//blahblahpopup.html html, also where the function is set.
</iframe>
</iframe>
</body>
So, as you can see, there is an <iframe> in an <iframe>.
Now lets get down to business. I'm using this JS code to get my JS context into the first level <iframe> with the name 'iframe'
window.frames['iframe'].showAssetPicker();
What that does is it calls the popup inside the first-level <iframe>. But now I need to call a function inside of the popup that was just called. (which is yet another <iframe>... I'm not the cause of all the <iframe>'s...)
So here's my failed attempt of calling a function defined in the second-level <iframe>...
window.frames['iframe'].frames['iFrame2'].populateTypePullDown('/getdata/');
I also tried
window.frames['iframe'].window.frames['iFrame2'].populateTypePullDown('/getdata/');
Neither seem to work. Any help with this? I am using node-webkit to remove <iframe> security restrictions.
Thanks for any help you can throw my way!
P.S. Goodness gracious, I said <iframe> far too many times in this post.
window.frames['iframe'].contentWindowinstead?