Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
acidrain9 #1
hiding css layer
is it possible to only show a layer based on a cookie? if so how?
also is it possible to time a css layer so that it hides automatically after a
period of time, or after the flash animation inside it is finished?
thanks
acidrain9 Guest
-
layer hiding pull down menus
I have created this beautiful template for a future shopping cart. I created the top and side menu in Fireworks MX, in fact, almost the whole page... -
activeX axShockwave.loadMovie(Layer, url) ... what is layer for ?
Hi All, I am working with the shockwave activeX controll loading flash movies into my c# applications. ( I am using falsh mx 2004 Pro) The movies... -
Cross Browser hiding layer/div
The function below is used to hide a div on it's mouseout event. As you can see it is for IE and NN 4 (incidentally I enclosed the div in an NN 4... -
PE2: Selecting and painting a layer having a Hidden Power Tools' layer mask?
I am making a collage using PE2. I have a background layer (solid color) and then each photo is on its own layer with a layer mask used from the... -
on Director : 3D layer + flash (SWF) layer (or with other layer type)
Thankx for all it's works :) Coool -
rilkesf #2
Re: hiding css layer
Yes to both parts.
Create a basic hide() function in javascript like the one below and trigger it
onload:
function hide() {
var div = 'hide1';
if(document.getElementById) {
document.getElementById(div).style.visibility = 'hidden';
} else if (document.layers) {
document.div.visibility = 'hidden';
} else {
document.div.style.visibility = 'hidden';
}
}
In this case, the id of the <div> you're hiding is "hide1". In your case, you
would set the name(s) of the elements you wanted to hide via the cookie.
If you want to hide after a certain amount of time, set the following function
to <body onLoad> instead:
function timedhide() {
setTimeout(hide, 5000);
}
where "5000" is how long before you want the hide() function to trigger. The
time is in milliseconds (i.e. seconds X 1000) so this is set to trigger after 5
seconds.
This method relies on javascript and is therefore (to an extent) unreliable.
A more reliable way would be to load the cookie via a server side script (as in
PHP) and then use a php variable to change the inline CSS information for the
appropriate elements. I'm not sure if you can do a timed hide via PHP though,
since the timing would happen on the client side.
Hope that helps
rilkesf Guest



Reply With Quote

