Posts

Showing posts with the label HTML

Acquiring List of controls - Classic JS

Recently ran into a scenario where I need to use the low-level JavaScript parser, instead of JQuery.  During this venture, I ran across a situation where it would be easier for me to select all the HTML Elements with an ID, assign it to a variable as JSON, and then operate on it from that point. So using my previous short-hand experience with JQuery, I started constructing a similar type of format to be used. *********** JQuery *************** // One line and your done, pretty much var cntrls = $('[id]') // Later on, you simply access the element from the variable var val = cntrls['someID'].value *********** JavaScript *********** // Not so one-liner; put in the DOM.Ready event for JS var cntrlIDs = {} var root = document.getElementById('rootID').querySelectorAll('*'); for (i = 0, n = root.length; i < n; ++i) { var el = root[i]; if (el.id) { cntrlIDs[el.id] = el; } } // Later...

HTML Compatability Modes

As a web-developer, I find it unfortunately necessary to force a browser(s) to conform to my preferred platform.  That being said, i have not been able (as of this posting) to find a aggregate knowledge base of all the available Meta values for the "X-UA-Compatible" header entry.  So below you will find my currently identified valid values. Syntax: <meta http-equiv="X-UA-Compatible" content="<value>"> Possible Values for <value>, by Browser: Internet Explorer = IE IE=5 Quirks Mode; pretty much anything less than IE 7 IE=7 IE 7 Mode IE=8 IE 8 Mode IE=9 IE 9 Mode IE=10 IE 10 Mode IE=11 IE 11 Mode IE=edge Highest supported document mode of the browser Quirks Emulate Values (If a valid <!DOCTYPE> declaration is present) IE=EmulateIE7 IE 7 Mode; otherwise, Quirks Mode (equivalent to IE=5) IE=EmulateIE8 IE 8 Mode; otherwise, Quirks Mode (equivalent to IE=5) IE=EmulateIE9 IE 9 Mode; otherwi...