When to check persist checkbox after page reload?

When to check persist checkbox after page reload?

Quick Tip: Persist Checkbox Checked State after Page Reload. This quick tip describes how to have your browser remember the state of checkboxes once a page has been refreshed or a user navigates away from your site to come back at a later date.

How to retain the value after page refresh?

You will have to use cookie to store the value across page refresh. You can use any one of the many javascript based cookie libraries to simplify the cookie access, like this one If you want to support only html5 then you can think of Storage api like localStorage / sessionStorage

How does web storage work between page loads?

With the introduction of HTML5 we also got Web Storage, which allows you to save information in the browser across page loads. There is localStorage which can save data for a longer period (as long as the user doesn’t manually clear it) and sessionStorage which saves data only during your current browsing session.

How to read data from a page load?

To read this data, you can use the following script on page load: Ability to use this depends on how your form currently works, if you already use a POST then this could be problematic. In addition, for larger sets of data this is less than optimal.

How to keep checkbox checked after refresh the page?

I have a dropdown-box, that when selecting from the drop down its shows the data. Also I have a checkbox above each td, that is used to hide the column this perform by java script,if the user check the checkbox and he select the another value in the drop down box then the selected checkbox will not show.

How to refresh the visual force page refresh?

Code provided by dipak is one way to do.You can also do this by initializing a boolean data type. supply this boolean variable to the output panel you want to,default value of boolean variable is false so it is in hidden state. on click/action the variable value should change to true, which displays the output panel

When to persist checkbox checked state in SitePoint?

It might be useful to Persist Checkbox Checked State if, for example, you use checkboxes to allow your users to set site-specific preferences, such as opening external links in a new window or hiding certain page elements. For the impatient among you, there’s a demo of the technique at the end of the article.