I have an iframe that is hidden with CSS on my page and i have it appear when a user clicks on an image to play a video. This is done by loading a seperate page into the IFrame.
Does anyone know how i can hide the iframe from a link within the page that loads in the IFrame?
Thanks
Colin
Ive managed to sort this myself.
I have this javascript code that i use to show and hide my div - function toggleVisibility(id, NNtype, IEtype, WC3type) {
-
if (document.getElementById) {
-
eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
-
} else {
-
if (document.layers) {
-
document.layers[id].visibility = NNtype;
-
} else {
-
if (document.all) {
-
eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
-
}
-
}
-
}
-
}
i call this as follows to show - toggleVisibility('movies','show','visible','visible')
and to hide - toggleVisibility('movies','hidden','hidden','hidden')
I have put the hide code in my page that is called into the iframe as follows - window.parent.toggleVisibility('movies','hidden','hidden','hidden')
This works a treat just incase anyone wants to know
colin
1 2269
Ive managed to sort this myself.
I have this javascript code that i use to show and hide my div - function toggleVisibility(id, NNtype, IEtype, WC3type) {
-
if (document.getElementById) {
-
eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
-
} else {
-
if (document.layers) {
-
document.layers[id].visibility = NNtype;
-
} else {
-
if (document.all) {
-
eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
-
}
-
}
-
}
-
}
i call this as follows to show - toggleVisibility('movies','show','visible','visible')
and to hide - toggleVisibility('movies','hidden','hidden','hidden')
I have put the hide code in my page that is called into the iframe as follows - window.parent.toggleVisibility('movies','hidden','hidden','hidden')
This works a treat just incase anyone wants to know
colin
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Wallace |
last post by:
I need to know how to change the src property of an iframe from script
that is executed in another iframe with both of these iframes being
contained on a document which is then contained by another...
|
by: sbeerav |
last post by:
Hi,
I wanted to know if it is legal in XML to declare an element within
itself. For example...
<A>
This is an element of type A.
<A>
This is another element of type A
</A>
|
by: Jacobus Terhorst |
last post by:
Using C#:
I tried:
ServiceController me = new ServiceController(this.ServiceName);
me.Stop();
it raises an exception: Cannot find Service
I also tried:
|
by: Brent.Lakatos |
last post by:
ASP.NET 2.0 Question:
I have a simple IFrame User Control that I wrote:
HTML:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="IFrameControl.ascx.cs" Inherits="IFrameControl" %>
...
|
by: shan |
last post by:
I used the following code in linked list in C.
typedef struct node
{
int data;
struct node *next; //more explanation needed for this line
}sll;
Is *next a variable to struct node,If...
|
by: Erich93063 |
last post by:
I have a page that pops open a window and in that pop up page is an
iframe. How can I send information back to the ORIGINAL parent page
that popped open the pop up from the iframe page?
Hope...
|
by: mvmashraf |
last post by:
How can I make an IFRAME resize itself when someone changes their resolution?
I have a table in that i am loading that iframe, I did give the width of Iframe and the width of table as 100%, What...
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I have a WinForm application that, depending on user actions, may spin for a
while doing extensive calculations, showing a progress bar in the meantime.
I would like to be able to launch a second...
|
by: musicmaster890 |
last post by:
I've got an iframe (id='vidiframe') that holds an iframe (id='ytvid') and I'd like to have a link (the link is in a separate iframe too) that would change the contents of that inner-most iframe, but...
|
by: vunet |
last post by:
I am still not clear about how to reference an object within another
object to pass first object to a function:
var Parent = {
myFunc : function(){
alert("Parent = "+this)
},
Child : {
//how...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |