Search code examples
javascriptformssubmission

Client-side html page with Javascript form data that persists when submit


Is it be possible to build a pure Html page (no php, no asp, no server-side) with a form that, though javascript only, will preserve its selected checkbox upon submission?

More specifically, I need to build a table that updates itself in realtime (as excel does with formula calculations) when some checkboxes are clicked. I cannot find a way to store a checkbox's state because on every page refresh (form submission action) the javascript variables will be reset.


Solution

  • With JavaScript you could just write event handlers for the checkbox 'check' event and therefore not require a form submission.

    Libraries like Knockout.JS allow you to update things like tables in 'realtime' based on calculations without requiring a page refresh.