-
IFrame - ToggleLink - Autoresize
I have an IFrame, Inside the IFrame I have 3 ToggleLinks(HyperLink-AnchorLink).This IFrame is not scrollable.
When I click LinkA it will extend and resize the IFrame, also when I click again the same LinkA it will minimize.
This is only for LinkA.Inside the Iframe other content also available.Please let me know How I will achive this in
different browsers like IE,FF.Scope is only resize the IFrame.
JavaScript
----------
function onLoadMethod{
var iFrame = document.getElementById('iFrame');
if(ie) {
iFrame.attchEvent("click",calculateHeight)
} else {
iFrame.addEventListener('onclick',calculateHeight,false);
}
}
function calculateHeight(e) {
}
PageA.htm
---------
<iframe id="iFrame" src="src.htm" scrollable="no">
scr.htm
-------
<a href="#linkA">Link A</a>
<a href="#linkB">Link B</a>
<a href="#linkC">Link C</a>
<div id="linkA">
This is Link A
This is Link A
This is Link A
</div>
<div id="linkB">
This is Link B
This is Link B
This is Link B
</div>
<div id="linkC">
This is Link C
This is Link C
This is Link C
</div>
Thanks
Last edited by msnkr; 10-06-2009 at 06:53 PM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks