Validation with JS Objects
Back in the before times, it wasn't such an uncommon thing to hack up an html INPUT to include "extra" attributes like 'errorMsg="Enter a number between 1 and 12" minVal="1" maxVal="12"' to aid in the client side validation of an input. Of course in the modern day web, this practice is well, let's just say undesirable. The most common alternative is to create a bunch of dynamically generated "onblur" and separate on "onsubmit" function calls.
Things like 'onblur="checkRange(this, 1, 52, 'Enter a valid Week Number');"', combined with "validateSubmit( … code … if(!checkRangeS($get('MyWeekTextBox'),1,15,' Enter a valid Week Number')){ return false; }...
More of this
Quick note, I'm still plugging away at prepping my .sdf file for my domain series, but it's slow going. I should be back into that series by Monday 11/5, but in the mean time, more on this.
Here are there functions that are using the checkthis function we defined here as well as using this to reference some data. The results of the alert portion of these functions almost always gives me pause, and if it's been a few weeks since I last thought in JS, I probably would get them wrong. There are some parts that are not to...