Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139