 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
hindy0123
Joined: 16 Nov 2008
Posts: 5
|
| Posted: Sun Nov 16, 2008 8:40 am iframe height and top issue |
|
|
Hi All,
I have an iframe in my page.
I change its height from a button inside the iframe using javascript. for example:
parent.document.getElementById('iframe').style.height="100px";
The problem is that if the iframe height was 500px for example, and I changed it to 100px then the whole iframe is shrink down. I mean that the 100px are the top 100px but they are appear in the button of the iframe and there are 400px empty at the beginning. Any Idea how to change it?
Thanks in advance |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS
|
| Posted: Sun Nov 16, 2008 3:25 pm |
|
|
Might find this script more useful: Iframe SSI script II
Might be something related HERE. |
|
|
hindy0123
Joined: 16 Nov 2008
Posts: 5
|
| Posted: Mon Nov 17, 2008 3:37 am |
|
|
Thanks for your quick response,
I have looked at those posts. I am also change the height property. My problem still exist since the iframe shrink down instead of up. |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS
|
| Posted: Mon Nov 17, 2008 12:53 pm |
|
|
| Thought you wanted to be able to change iframe size. Maybe post page link where you code is or what you are using now. |
|
|
hindy0123
Joined: 16 Nov 2008
Posts: 5
|
| Posted: Mon Nov 17, 2008 11:48 pm |
|
|
My base page contain several iframes:
<head>
<title><wicket:message key="liveManagement.title" /></title>
</head>
<wicket:extend>
<div id="iframe-container">
<iframe id="iframe-form-small" scrolling="no" wicket:id="ShowVidgetsFrame"></iframe>
<iframe id="iframe-form-small" scrolling="no" wicket:id="VideoFrame"></iframe>
<iframe id="iframe-form-small" scrolling="no" wicket:id="MessagesFrame"></iframe>
<iframe id="iframe-form-small" scrolling="no" wicket:id="PollsFrame"></iframe>
</div>
</body>
Each iframe looks like:
<form>
<h1>Show Frame</h1>
<input type="button" id="showButton" style="position:absolute; top:-1px; left:310px" value="Hide" onClick="showHideFrame()" />
</form>
<div id="showForm">
<span wicket:id="feedback" class="message"></span>
<form id="ShowVidgetForm_name" wicket:id="ShowVidget-form">
<p>Current Running Show Properties:</p>
.....
</form>
</div>
<script type="text/javascript"><!--
function showHideFrame() {
if( document.getElementById('showButton').value == "Hide"){
document.getElementById('showButton').value = "Show";
document.getElementById('showForm').style.display="none";
parent.document.getElementById('iframe-form-small').style.height="100px";
}
else{
document.getElementById('showButton').value = "Hide";
document.getElementById('showForm').style.display="";
parent.document.getElementById('iframe-form-small').style.height="500px";
}
}
//--></script>
Thanks in advance |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS
|
| Posted: Tue Dec 02, 2008 4:51 pm |
|
|
| Finding it hard to experiment with this since I can not get a functioning page locally. Any link online to this? |
|
|
hindy0123
Joined: 16 Nov 2008
Posts: 5
|
| Posted: Thu Dec 04, 2008 11:06 am |
|
|
Hi,
I found the problem, I had 4 iframes, 2 in each row in one big frame set. After I replace the one big frame set with 2 thin frmae set (each contains 2 iframes one below the other) it works.
Thanks for all the help. |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 1409
Location: Biloxi, MS
|
| Posted: Thu Dec 04, 2008 3:22 pm |
|
|
| I afraid I wasn't much help, but you're welcome anyway. :P Glad you "got 'er dun". |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|