Print Page | Close Window

iframe

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13856
Printed Date: 30 March 2026 at 3:04pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: iframe
Posted By: VBScript
Subject: iframe
Date 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?




Replies:
Posted By: bootcom
Date 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>



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net