Professional Web Applications Themes

How do I keep the layer visible/hidden after pagerefresh - Macromedia Dynamic HTML

Help the newbie please. Situation: A webpage that gets refreshed every minute. This webpage has buttons that open small screens/layers. These layers can also be closed. The problem is I dont know how to keep these screens open/closed (after refresh) according to how the user choose them to be. Please help....

  1. #1

    Default How do I keep the layer visible/hidden after pagerefresh

    Help the newbie please.

    Situation:
    A webpage that gets refreshed every minute. This webpage has buttons that open
    small screens/layers. These layers can also be closed.
    The problem is I dont know how to keep these screens open/closed (after
    refresh) according to how the user choose them to be.
    Please help.

    newbiejane Guest

  2. #2

    Default Re: How do I keep the layer visible/hidden after pagerefresh

    The easy way to to pass some varible to the URL. For example you could pass the
    div name to the URL whenever it is selected. By doing this your code that
    shows and hides divs could pull the variable from the URL and display the
    appropriate div. That way when the page refreshes it would again pull the
    variable from the URL and still display the same way.

    jeremyluby Guest

  3. #3

    Default Re: How do I keep the layer visible/hidden after page refresh

    I don't see how this would work through a refresh. There is no URL or
    variable to pass.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "jeremyluby" <webforumsusermacromedia.com> wrote in message
    news:e5ks0l$nqu$1forums.macromedia.com...
    > The easy way to to pass some varible to the URL. For example you could
    > pass the
    > div name to the URL whenever it is selected. By doing this your code that
    > shows and hides divs could pull the variable from the URL and display the
    > appropriate div. That way when the page refreshes it would again pull the
    > variable from the URL and still display the same way.
    >

    Murray *ACE* Guest

  4. #4

    Default Re: How do I keep the layer visible/hidden after pagerefresh

    Ok lets say that for each change in a layer I have an <a> tag that calls the
    same page with a parameter such as
    href="javascript:setHash('div2');displayLayerFromA nchor()"

    then is the body tag I put onLoad="displayLayerFromAnchor()"

    I place the following function in the head tag:

    function displayLayerFromAnchor()
    {
    var hash = location.hash;
    if(hash==null || hash=="")
    {
    MM_showHideLayers('div1','','show','div2','','hide ');
    }
    else if(hash=="#div1")
    {
    MM_showHideLayers('div1','','show','div2','','hide ');
    }
    else if(hash=="#div2")
    {
    MM_showHideLayers('div1','','hide','div2','','show ');
    }

    }
    function setHash(newHash)
    {
    url = (location.href.indexOf("#") >=
    0)?location.href.substring(0,location.href.indexOf ("#")):location.href;
    newUrl = url+"#"+newHash;
    location.replace(newUrl);
    window.scrollTo(0, 0);
    }

    What this accomplishes is that each time a new div is requested. The page
    would get the hashmark

    jeremyluby Guest

  5. #5

    Default Re: How do I keep the layer visible/hidden after page refresh

    That would work. It's ever so much more than a simple refresh, though.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "jeremyluby" <webforumsusermacromedia.com> wrote in message
    news:e5n7gg$ppb$1forums.macromedia.com...
    > Ok lets say that for each change in a layer I have an <a> tag that calls
    > the
    > same page with a parameter such as
    > href="javascript:setHash('div2');displayLayerFromA nchor()"
    >
    > then is the body tag I put onLoad="displayLayerFromAnchor()"
    >
    > I place the following function in the head tag:
    >
    > function displayLayerFromAnchor()
    > {
    > var hash = location.hash;
    > if(hash==null || hash=="")
    > {
    > MM_showHideLayers('div1','','show','div2','','hide ');
    > }
    > else if(hash=="#div1")
    > {
    > MM_showHideLayers('div1','','show','div2','','hide ');
    > }
    > else if(hash=="#div2")
    > {
    > MM_showHideLayers('div1','','hide','div2','','show ');
    > }
    >
    > }
    > function setHash(newHash)
    > {
    > url = (location.href.indexOf("#") >=
    > 0)?location.href.substring(0,location.href.indexOf ("#")):location.href;
    > newUrl = url+"#"+newHash;
    > location.replace(newUrl);
    > window.scrollTo(0, 0);
    > }
    >
    > What this accomplishes is that each time a new div is requested. The page
    > would get the hashmark
    >

    Murray *ACE* Guest

Similar Threads

  1. edit hidden images in layer
    By QJS_NL in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: September 23rd, 09:18 AM
  2. Can't get text value of hidden (visible = false) column..
    By jef in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: March 21st, 08:33 AM
  3. Canít write to Hidden Layer
    By Paul_Wallace@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 3
    Last Post: May 14th, 08:41 PM
  4. ē apply a tranformation on layer(s), when paths are visible
    By dimitri_c@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 3
    Last Post: March 4th, 10:10 AM
  5. 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

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