# Parent and Iframe Issue! both R on the same domain?

**URL:** <https://forum.kirupa.com/t/parent-and-iframe-issue-both-r-on-the-same-domain/278714>\
**Category:** Uncategorized\
**Created:** [January 4, 2009, 11:23am UTC](https://forum.kirupa.com/t/parent-and-iframe-issue-both-r-on-the-same-domain/278714 "2009-01-04T11:23:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benny1](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@Benny1](https://forum.kirupa.com/u/Benny1)\
**Post date:** [January 4, 2009, 11:23am UTC](https://forum.kirupa.com/t/parent-and-iframe-issue-both-r-on-the-same-domain/278714/1 "2009-01-04T11:23:01Z")

</div>

From what I Know Both files must reside on the same domain "DONE!’.  
Parent — textbox1.value= “”  
Iframe — textbox1.value= “”  
When IFrame loads a my button "called Contents " appears … I click it calls calls Function thecontents() \<!–  
this is the iframe function–\>  
\<button… Contents \</button\> //calls Function thecontents()//

```auto

headerList =document.body.innerHTML
textbox1.value = "<pre>" + headerList + "</pre>";

```

Now Iframe textbox1.value= ‘NEW DATA in here from contents Iframes innerhtml’  
is filled with the data I need… //I have the data I need//  
// now lets send the data from the Iframe’s text1.value to the parent textbox1//

//“Error at this point”//

```auto

X =document.getElementById('textbox1').value ['myIframe'].document.getElementById('textbox1').value
 
alert(x) //"Error at this point"//
x= Iframes Textbox1.value
 
 
parents textbox1.value x ; // should show X but it does'nt//

```

My Files test1.htm and test2.htm are on my local computer for testing  
I did test in my local webserver worked ok until I try to send the data to  
the parent…  
test1.htm the parent  
test2.htm the Iframe inside parent
