Web Analytics Made Easy -
StatCounter store DIV style with javascript? - CodingForum

Announcement

Collapse
No announcement yet.

store DIV style with javascript?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • store DIV style with javascript?

    I have programmed a webpage with a few html DIVs which can be collapsed and expanded by changing "style.visibility". When the page is refreshed, the styles of the DIVs return to the initial state defined in the source code. Can I use javascript to remember the styles and apply them when the page is refreshed? If not, can it be done with combination of javascript and VB.Net?

    thanks,

  • #2
    This can be done with a cookie

    see

    http://www.vicsjavascripts.org.uk/Me...MenuMemory.htm
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/

    Comment


    • #3
      Can you please explain how mmGet_Cookie and mmSet_Cookie work? I am not generating the DIVs dynamically, so there will be quite a bit configuration. I guess the real questions are:

      1. how to store the state and the matching DIV in the cookie?

      2. how to retrieve the state?

      3. Do I create one cookie for all DIVs, or one cookie per DIV?

      thanks,

      Comment

      Working...
      X