Tuesday, October 27, 2015

Revised Home Page's Awkward Validation Code

I had an annoying error arise when the limits of the RANGE were changed by the user **. (The awkwardness came from my validation of each range limit the moment it was changed. Thus, if the user wanted to change both range values and managed to change only one to start with, he may prematurely have met an error dialogue that would reset the range to original default values.)

Now I validate Home Page parameters upon departure from Home Page (and not "onchange" of either range value). I also, now, restore the user's new values when Home Page reloads.

I used the new sessionStorage object featured in HTML 5. If a session started and the user changed the home-page parameters from their original default values, the modified values survive until the user again changes them.

Now at version 30.

** (In June 6th post I made reference to this annoying problem.)