Forum Moderators: open

Message Too Old, No Replies

Change iframe's width/height and src inside this iframe

The problem is, iframe and parent are under two domains

         

iProgram

9:41 am on Oct 4, 2005 (gmt 0)

10+ Year Member



Page A is parent page, Page B is the source of an <iframe> of Page A. I want to change the width/height and src value of this <iframe> inside Page B. Related Source Code:
www.domain-1.tld/page-A.html
<body>
...
<iframe id="test" src="http://www.domain-2.tld/page-B.html" width="100" height="100"></iframe>
...
</body>

www.domain-2.tld/page-B.html


<body>
...
<script type="text/javascript"><!--
var fam=parent.document.getElementById('test');
fam.width=600;
fam.height=600;
//--></script>
</body>

It does not work because Page-B is unable to access parent.document which is under another domain. So my question is, how to modify the weight/height and src of iframe inside page B?

[edited by: rogerd at 9:16 pm (utc) on Oct. 5, 2005]
[edit reason] fix format [/edit]

Bernard Marx

10:45 am on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Probably not possible.

iProgram

12:14 pm on Oct 4, 2005 (gmt 0)

10+ Year Member



What's wrong with this thread?

Bernard Marx

12:26 pm on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have no idea, but it certainly makes a change.