Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - iframe
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

iframe

 Post Reply Post Reply
Author
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post Topic: iframe
    Posted: 17 February 2005 at 5:18am
I have an iframe that i want to display  when an image is clicked on...

var oDialog = document.getElementById('cp' + rte);
var buttonElement = document.getElementById(command + '_' + rte);

rte + .contentWindow.focus()
document.getElementById('cp' + rte).style.left = getOffsetLeft(buttonElement) + 'px';
    document.getElementById('cp' + rte).style.top = (getOffsetTop(buttonElement) + buttonElement.offsetHeight) + 'px';

The iframe is called 'cp' + rte

Is this corect?

Back to Top
bootcom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 February 2005
Location: United Kingdom
Status: Offline
Points: 259
Post Options Post Options   Thanks (0) Thanks(0)   Quote bootcom Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2005 at 10:31pm

Not too sure what your doing there to be honest, but if you just set the iframe style attribute to nothing and call using a js function like I have below, am sure it will all work good for you Smile

<script language="javascript">
function showIframe(){
var iframeStyle = document.getElementById("MyIframe").style
if(iframeStyle.display == ""){
iframeStyle.display = "none";
return;
}
iframeStyle.display = "";
return
}
 
<img onclick="showIframe()" src="somesource.gif">
 
<iframe id="MyIframe" width="100%" height="300" style="display: none"></iframe>
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.