 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
sailershen
Joined: 08 Jun 2008
Posts: 1
|
| Posted: Tue Jun 10, 2008 11:19 pm How to change height of iframe |
|
|
My index.html:
Code:
<iframe name=top src=top.html
<iframe name=leftindex id=leftindex src=index_left.html
<iframe name=rightindex id=rightindex src=index_right.html
In top.html:
Code:
<a href="javascript:change()">change</a>
<script language="javascript">
function change() {
document.getElementById("leftindex").height=2000px;
document.getElementById("rightindex").height=2000px;
}
In top.html, I want change the height of the 2 iframes, the "document.getElementById" cannot change it, and "parent.leftindex.height=2000px" cannot change it also.
Who can tell me how can chang the height of iframe in top.html? |
|
|
Straystudio
Joined: 14 Apr 2008
Posts: 297
Location: Nord Italy
|
| Posted: Wed Jun 11, 2008 8:49 am |
|
|
First of all, You MUST have 2000px between QUOTATION MARKS.
And document.getElementById("leftindex").height="2000px"; already works.
Also remember, some other Elements can be sized in JavaScript via document.getElementById("").style.height="" |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|