Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / February 2008



Tip: Looking for answers? Try searching our database.

sending data from IFRAME to container page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stimp - 29 Feb 2008 09:58 GMT
Hi all,

Say I have a page called mytest.htm with an IFRAME in it and an input
field:
<input id="src" name="src" type="text" />

How do I send the an example word "blah" from the iframe to populate the
input field?

I tried window.opener.document.src.value = "blah";

but that hasn't worked .. my google searches are proving fruitless.

tia.
Signature


fiddlewidawiddum

Erwin Moller - 29 Feb 2008 10:12 GMT
> Hi all,
>
[quoted text clipped - 10 lines]
>
> tia.

Do not use 'opener' but 'parent'.
Also have a look at top.

Regards,
Erwin Moller
Stimp - 29 Feb 2008 10:56 GMT
>> Hi all,
>>
[quoted text clipped - 13 lines]
> Do not use 'opener' but 'parent'.
> Also have a look at top.

thanks for the tip.

A bit of editing and
window.parent.document.getElementById('src').value = url;

does the trick!
Signature


fiddlewidawiddum

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.