Professional Web Applications Themes

hiding css layer - Macromedia Dynamic HTML

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...

  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. #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(doent.getElementById) {
    doent.getElementById(div).style.visibility = 'hidden';
    } else if (doent.layers) {
    doent.div.visibility = 'hidden';
    } else {
    doent.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

Similar Threads

  1. layer hiding pull down menus
    By Fordette2 in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: December 8th, 04:53 PM
  2. Cross Browser hiding layer/div
    By Chris Kennedy in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: September 13th, 12:24 PM
  3. Bottom layer spoils its upper layer
    By jae kim in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 2
    Last Post: August 13th, 06:15 AM
  4. PE2: Selecting and painting a layer having a Hidden Power Tools' layer mask?
    By Richard Hirschman in forum Adobe Photoshop Elements
    Replies: 6
    Last Post: August 7th, 03:05 PM
  5. on Director : 3D layer + flash (SWF) layer (or with other layer type)
    By onelsonic webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 1
    Last Post: July 16th, 01:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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