Jump to content

JS list


vchris
 Share

Recommended Posts

I have a JavaScript list which is kinda huge. There's about 3 level to this list. I added a function to minize and maximize a list on click. I've been asked if there is a way to "remember" which list is maximized so when you do a back it'll stay opened. All I can think of is the use of cookies but in my organization we have standards that stops me from using cookies. So is there any other way I could use to do this "remember" feature? I use ColdFusion also if it helps.

Link to comment
Share on other sites

The only other way would be to store that information in a CF session. Standards are very important in organizations but I find that a strange rule at least for minor features such as what you mentioned. Personally I would view it that same as JavaScript. They should be used to enhance the application but the application would still be fully functional with cookies blocked.

Link to comment
Share on other sites

I don't know much CF but I assume it works much the same as others do. Here is how you would do it in ASP.Net and PHP (assume the session has already been saved , probably through AJAX).ASP.Net

 var jsvar = "<%= Session["YourSession"].ToString() %>";

PHP

 var jsvar = "<?= $_SESSION["YourSession"] ?>";

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...