{"id":20256,"date":"2016-02-20T03:01:33","date_gmt":"2016-02-19T17:01:33","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=20256"},"modified":"2016-02-20T06:23:56","modified_gmt":"2016-02-19T20:23:56","slug":"html-themed-supervision-second-genericization-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-themed-supervision-second-genericization-tutorial\/","title":{"rendered":"HTML Themed Supervision Second Genericization Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML Themed Supervision Second Genericization Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle--interest.jpg\" title=\"HTML Themed Supervision Second Genericization Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML Themed Supervision Second Genericization Tutorial<\/p><\/div>\n<p>Some days ago we left off with <a target=_blank title='HTML\/Javascript Themed Supervision Primer Tutorial' href='#hjtspt'>HTML\/Javascript Themed Supervision Primer Tutorial<\/a> having a pretty hardcoded feel to it, as a web application gathering together other web applications under the concept of &#8220;ESL Ideas&#8221;.  Then yesterday we started on our &#8220;genericization&#8221; drive involving the introduction of external Javascript and the address bar URL GET parameters, as dynamic controllers of web application content.<\/p>\n<p>Yesterday stayed within the realms of client side HTML and Javascript (and CSS), and today, we stay there for some more functionality on the theme of &#8220;interactivity&#8221;.<\/p>\n<p>We&#8217;ve talked before at this blog about the wonders of Javascript &#8230; <code> <a target=_blank title='Javascript DOM document.write method information from wschools' href='http:\/\/www.w3schools.com\/jsref\/met_doc_write.asp'>document.write<\/a>(<a target=_blank title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp'>prompt<\/a>([wording],[default])); <\/code> &#8230; last time was with <a target=_blank title='HTML\/Javascript Clairvoyance Tester Mobile Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-clairvoyance-tester-mobile-tutorial\/'>HTML\/Javascript Clairvoyance Tester Mobile Tutorial<\/a> &#8230; and today we revisit that &#8220;wonder&#8221; &#8230; wonderful!<\/p>\n<p>The logic with our purely Javascript DOM extra functionality is that, as you may remember from <a target=_blank title='HTML\/Javascript Themed Supervision Primer Tutorial' href='#hjtspt'>HTML\/Javascript Themed Supervision Primer Tutorial<\/a> &#8230; way back when &#8230; just plain old <i>document.write([someHTML])<\/i> helped us have a feel with our HTML and Javascript that we are a &#8220;bit&#8221; &#8230; just a tad &#8230; like a server side language like PHP &#8230; delaying the output of HTML until ready.  Well, now, today, ponder &#8230;<\/p>\n<p><code><br \/>\n document.write(itdepends(outhtml));<br \/>\n<\/code><\/p>\n<p> &#8230; and the Javascript <i>itdepends<\/i> function &#8230;<\/p>\n<p><code><br \/>\nfunction itdepends(inh) {<br \/>\n  var ct='Change this', cellno=1, pregs, gs, hw='', cellmemno=1, outh=inh, cells, kc, ic, thisbutton, precells, jc=0, lastsuff='', postcell, suff='&lt;br&gt;', xlast=' setTimeout(andthen, 200); ', zlast='', lastc='';<br \/>\n  var inask=location.search.split('ask=')[1] ? location.search.split('ask=')[1].split('&amp;')[0] : ' ';<br \/>\n  if (inask != ' ') {<br \/>\n    cells=inh.split('&lt;\/h1&gt;');<br \/>\n    thisbutton=cells[0] + '&lt;\/h1&gt;';<br \/>\n    dis=thisbutton.replace(\/\"\/g, \"' + String.fromChar(34) '\");<br \/>\n    lastc=\"&lt;scr\" + \"ipt type='text\/javascript'&gt; var dis\" + jc + \"=\" + '\"' + dis + '\"' + \";  document.write(prompt(\" + '\"' + \"Change this Theme and\/or its dropdown?\" + '\"' + \",dis\" + jc + \"));  &lt;\/scr\" + \"ipt&gt;\";<br \/>\n    outh=outh.replace(thisbutton, lastc);<br \/>\n    lastc='';<br \/>\n    cells=inh.split('&lt;\/td&gt;');<br \/>\n    for (ic=0; ic&lt;cells.length; ic++) {<br \/>\n      if (cells[ic].indexOf('&lt;\/button&gt;') != -1) {<br \/>\n        precells=cells[ic].split('&lt;\/button&gt;');<br \/>\n        for (kc=0; kc&lt;precells.length; kc++) {<br \/>\n         if (precells[kc].replace('&lt;\/div&gt;','').indexOf('&lt;button') != -1) {<br \/>\n          postcell=(' ' + precells[kc]).split('&lt;button');<br \/>\n          thisbutton='&lt;button' + postcell[1] + '&lt;\/button&gt;';<br \/>\n          suff='';<br \/>\n          ct='Change this ' + hw + 'web application button ' + cellmemno + ' (of ' + eval(-1 + precells.length) + ') in cell ' + cellno + ' of 9 ... nothing is allowed';<br \/>\n          if (outh.indexOf(thisbutton + '&lt;br&gt;') != -1) {<br \/>\n           suff='&lt;br&gt;';<br \/>\n           thisbutton += suff;<br \/>\n           lastsuff=suff;<br \/>\n          } else if (outh.indexOf(thisbutton + '&lt;') == -1) {<br \/>\n           gs=outh.split(thisbutton);<br \/>\n           pregs=gs[1].split('&lt;');<br \/>\n           suff=pregs[0];<br \/>\n           thisbutton += suff;<br \/>\n           lastsuff=suff;<br \/>\n          } else {<br \/>\n           ct='Change this ' + hw + 'web application button ' + cellmemno + ' (of ' + cellmemno + ') in cell ' + cellno + ' of 9 ... nothing is allowed ... to add more, best delimiter between buttons is ' + lastsuff + ' ';<br \/>\n          }<br \/>\n          jc++;<br \/>\n          dis=thisbutton.replace(\/\"\/g, \"' + String.fromChar(34) '\");<br \/>\n          lastc=\"&lt;scr\" + \"ipt type='text\/javascript'&gt; var dis\" + jc + \"=\" + '\"' + dis + '\"' + \";  document.write(prompt(\" + '\"' + ct + \"?\" + '\"' + \",dis\" + jc + \"));  &lt;\/scr\" + \"ipt&gt;\";<br \/>\n          outh=outh.replace(thisbutton, lastc);<br \/>\n          if (suff != '') {<br \/>\n            cellmemno++;<br \/>\n          } else {<br \/>\n            cellno++;<br \/>\n            cellmemno=1;<br \/>\n            lastsuff='';<br \/>\n            if (cellno == 5) {<br \/>\n              hw='hidden ';<br \/>\n            } else {<br \/>\n              hw='';<br \/>\n            }<br \/>\n          }<br \/>\n         }<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n  if (lastc != '') outh=outh.replace(lastc, lastc.replace('&lt;\/scr', xlast + '&lt;\/scr'));<br \/>\n  return outh;<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; voila &#8230; <i>document.write([someHTML])<\/i> is usefully nesting <i>document.write([someReworkedHTML])<\/i> &#8230; was wondering when this <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/?s=onion\" title='Onions'>&#8220;onion of the 4th dimension&#8221;<\/a> would come.<\/p>\n<p>Once again, have a look at our HTML and Javascript and CSS programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html--GETME\" title='middle_interest.html'>middle_interest.html<\/a> (changed from before as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html--GETME\" title='middle_interest.html'>this link<\/a>) supervising the external Javascript you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.js-GETME\" title='middle_interest.js'>middle_interest.js<\/a> (changed from before as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.js-GETME\" title='middle_interest.js'>this link<\/a>) and\/or try a &#8230;<\/p>\n<ul>\n<li>old hardcoded <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.htm\" title='click picture'>live run<\/a><\/li>\n<li>new nuanced look via programmer document.head.innerHTML HTML script tag  <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\" title='click picture'>live run<\/a> &#8230; note the spelling of first buttons in each cell (the dropdown of which allows you to choose today&#8217;s &#8220;interactive&#8221; mode of use, as required)<\/li>\n<li>user controlled live run, adding onto programmer document.head.innerHTML HTML script tag, bringing extra options from cell[2,3] up into cell[1,1] &#8230; via URL &#8230;<br \/>\n<code><a style='text-decoration:none;' target=_blank title='User controlled example (adds to script tags)' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&#038;oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&#038;te1_1_=HTMLCSS\/listen_to.html&#038;bv1_1_=Hearing,%20Listening&#038;oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&#038;te2_1_=TESOL\/ListeningTask2\/&#038;bv2_1_=Love%20at%20First%20Bite&#038;oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&#038;te3_1_=TESOL\/ListeningTask\/&#038;bv3_1_=Tapioca%20Five%20Ways&#038;oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&#038;te4_1_=PHP\/decodepictowords.php&#038;bv4_1_=Pictogram%20Decode&#038;oc5_1_=ITblog\/past-present-tense\/&#038;te5_1_=ITblog\/past-present-tense\/%23content&#038;bv5_1_=Past%20and%20Present%20Tense&#038;oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&#038;te6_1_=HTMLCSS\/hart_via_ella.html&#038;bv6_1_=Song%20Lyrics'>http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&te1_1_=HTMLCSS\/listen_to.html&bv1_1_=Hearing,%20Listening&oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&te2_1_=TESOL\/ListeningTask2\/&bv2_1_=Love%20at%20First%20Bite&oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&te3_1_=TESOL\/ListeningTask\/&bv3_1_=Tapioca%20Five%20Ways&oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&te4_1_=PHP\/decodepictowords.php&bv4_1_=Pictogram%20Decode&oc5_1_=ITblog\/past-present-tense\/&te5_1_=ITblog\/past-present-tense\/%23content&bv5_1_=Past%20and%20Present%20Tense&oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&te6_1_=HTMLCSS\/hart_via_ella.html&bv6_1_=Song%20Lyrics<\/a><\/code><br \/>\n&#8230; or click picture link below &#8230;<br \/>\n<a target=_blank title='User controlled example (adds to script tags)' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&#038;oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&#038;te1_1_=HTMLCSS\/listen_to.html&#038;bv1_1_=Hearing,%20Listening&#038;oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&#038;te2_1_=TESOL\/ListeningTask2\/&#038;bv2_1_=Love%20at%20First%20Bite&#038;oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&#038;te3_1_=TESOL\/ListeningTask\/&#038;bv3_1_=Tapioca%20Five%20Ways&#038;oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&#038;te4_1_=PHP\/decodepictowords.php&#038;bv4_1_=Pictogram%20Decode&#038;oc5_1_=ITblog\/past-present-tense\/&#038;te5_1_=ITblog\/past-present-tense\/%23content&#038;bv5_1_=Past%20and%20Present%20Tense&#038;oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&#038;te6_1_=HTMLCSS\/hart_via_ella.html&#038;bv6_1_=Song%20Lyrics'><img src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle-interest.jpg' title='How this looks'><\/img><\/a><\/li>\n<li>new interactive <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?ask=y\" title='click picture'>live run<\/a> (the same as if the dropdown was set to the &#8220;interactive&#8221; mode of use)<\/li>\n<\/ul>\n<hr>\n<p id='htsfgt'>Previous relevant <a target=_blank title='HTML Themed Supervision First Genericization Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html-themed-supervision-first-genericization-tutorial\/'>HTML Themed Supervision First Genericization Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML Themed Supervision First Genericization Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middleinterest.jpg\" title=\"HTML Themed Supervision First Genericization Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML Themed Supervision First Genericization Tutorial<\/p><\/div>\n<p>Some days ago we left off with <a target=_blank title='HTML\/Javascript Themed Supervision Primer Tutorial' href='#hjtspt'>HTML\/Javascript Themed Supervision Primer Tutorial<\/a> having a pretty hardcoded feel to it, as a web application gathering together other web applications under the concept of &#8220;ESL Ideas&#8221;.<\/p>\n<p>We saw this application then, as now, as being a great candidate to take you through some genericization ideas.<\/p>\n<p>Today&#8217;s genericization ideas stay within the realm of client side web application functionality, only &#8230; the reason the blog title mentions &#8220;First&#8221;.  We go over some similar concepts as to when we presented <a target=_blank title='PHP\/HTML with External Javascript Slotting In Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/phphtml-with-external-javascript-slotting-in-tutorial\/'>PHP\/HTML with External Javascript Slotting In Tutorial<\/a> where both &#8230;<\/p>\n<ol>\n<li>document.head.innerHTML HTML script tag GET properties and\/or overworked by<\/li>\n<li>document.URL GET properties<\/li>\n<\/ol>\n<p>So we allow the web application &#8220;theme&#8221; and the three HTML button aspects described by, again &#8230;<\/p>\n<ol>\n<li>a label (that is displayed and is that HTML button element&#8217;s <a target=_blank title='HTML innerHTML property information' href='http:\/\/www.w3schools.com\/jsref\/prop_html_innerhtml.asp'>innerHTML<\/a> property)<\/li>\n<li>a title containing a URL to reach the &#8220;tutorial web application&#8221; as above<\/li>\n<li>an onclick event, the function called passing across a <i>this<\/i> var<font size=1>iable<\/font> pointing at the HTML button element and a URL to reach the &#8220;tutorial (itself)&#8221; as above<\/li>\n<\/ol>\n<p> &#8230; can now be dynamically controlled by the user in the last of those two ways described (way) above, and by the writer of the software with the <i>document.head.innerHTML<\/i> approach.<\/p>\n<p>And there is more to come involving possible interactivity and serverside functionality.  Hope you get some good ideas from this thread of postings.<\/p>\n<p>In the meantime, again, have a look at our HTML and Javascript and CSS programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html-GETME\" title='middle_interest.html'>middle_interest.html<\/a> (changed from before as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html-GETME\" title='middle_interest.html'>this link<\/a>) supervising the new external Javascript you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.js_GETME\" title='middle_interest.js'>middle_interest.js<\/a> and\/or try a &#8230;<\/p>\n<ul>\n<li>old hardcoded <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.htm\" title='click picture'>live run<\/a><\/li>\n<li>new nuanced look via programmer document.head.innerHTML HTML script tag  <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\" title='click picture'>live run<\/a> &#8230; note the spelling of first buttons in each cell<\/li>\n<li>user controlled live run, adding onto programmer document.head.innerHTML HTML script tag, bringing extra options from cell[2,3] up into cell[1,1] &#8230; via URL &#8230;<br \/>\n<code><a style='text-decoration:none;' target=_blank title='User controlled example (adds to script tags)' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&#038;oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&#038;te1_1_=HTMLCSS\/listen_to.html&#038;bv1_1_=Hearing,%20Listening&#038;oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&#038;te2_1_=TESOL\/ListeningTask2\/&#038;bv2_1_=Love%20at%20First%20Bite&#038;oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&#038;te3_1_=TESOL\/ListeningTask\/&#038;bv3_1_=Tapioca%20Five%20Ways&#038;oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&#038;te4_1_=PHP\/decodepictowords.php&#038;bv4_1_=Pictogram%20Decode&#038;oc5_1_=ITblog\/past-present-tense\/&#038;te5_1_=ITblog\/past-present-tense\/%23content&#038;bv5_1_=Past%20and%20Present%20Tense&#038;oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&#038;te6_1_=HTMLCSS\/hart_via_ella.html&#038;bv6_1_=Song%20Lyrics'>http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&te1_1_=HTMLCSS\/listen_to.html&bv1_1_=Hearing,%20Listening&oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&te2_1_=TESOL\/ListeningTask2\/&bv2_1_=Love%20at%20First%20Bite&oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&te3_1_=TESOL\/ListeningTask\/&bv3_1_=Tapioca%20Five%20Ways&oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&te4_1_=PHP\/decodepictowords.php&bv4_1_=Pictogram%20Decode&oc5_1_=ITblog\/past-present-tense\/&te5_1_=ITblog\/past-present-tense\/%23content&bv5_1_=Past%20and%20Present%20Tense&oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&te6_1_=HTMLCSS\/hart_via_ella.html&bv6_1_=Song%20Lyrics<\/a><\/code><br \/>\n&#8230; or click picture link below &#8230;<br \/>\n<a target=_blank title='User controlled example (adds to script tags)' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html?theme=My%20ESL&#038;oc1_1_=ITblog\/htmljavascript-hearing-and-listening-primer-tutorial\/&#038;te1_1_=HTMLCSS\/listen_to.html&#038;bv1_1_=Hearing,%20Listening&#038;oc2_1_=ITblog\/english-learning-listening-class-love-at-first-bite\/&#038;te2_1_=TESOL\/ListeningTask2\/&#038;bv2_1_=Love%20at%20First%20Bite&#038;oc3_1_=ITblog\/english-learning-listening-class-tapioca-five-ways\/&#038;te3_1_=TESOL\/ListeningTask\/&#038;bv3_1_=Tapioca%20Five%20Ways&#038;oc4_1_=ITblog\/php-pictogram-word-decoding-game-primer-tutorial\/&#038;te4_1_=PHP\/decodepictowords.php&#038;bv4_1_=Pictogram%20Decode&#038;oc5_1_=ITblog\/past-present-tense\/&#038;te5_1_=ITblog\/past-present-tense\/%23content&#038;bv5_1_=Past%20and%20Present%20Tense&#038;oc6_1_=ITblog\/mixed-up-song-lyrics-game-primer-tutorial\/&#038;te6_1_=HTMLCSS\/hart_via_ella.html&#038;bv6_1_=Song%20Lyrics'><img src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle-interest.jpg' title='How this looks'><\/img><\/a><\/li>\n<\/ul>\n<hr>\n<p id='hjtspt'>Previous relevant <a target=_blank title='HTML\/Javascript Themed Supervision Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-themed-supervision-primer-tutorial\/'>HTML\/Javascript Themed Supervision Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript Themed Supervision Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.jpg\" title=\"HTML\/Javascript Themed Supervision Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Themed Supervision Primer Tutorial<\/p><\/div>\n<p>Today we want to show another <a target=_blank title='Overlay tutorials at this blog' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/overlay'>&#8220;overlay&#8221;<\/a> variation on HTML and Javascript supervision of other web applications, in an HTML <a target=_blank title='HTML iframe element information from wschools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> element.  We make the look of this supervisor be a central &#8220;core&#8221; child web application that is either a &#8230;<\/p>\n<ul>\n<li>tutorial web application &#8230; or &#8230;<\/li>\n<li>tutorial (itself)<\/li>\n<\/ul>\n<p> &#8230; displayed in a middle &#8220;overlay&#8221; HTML iframe element.<\/p>\n<p>That middle &#8220;overlay&#8221; HTML iframe element&#8217;s content is controlled by (the clicking of) HTML <a target=_blank title='HTML button element information from wschools' href='http:\/\/www.w3schools.com\/tags\/tag_button.asp'>button<\/a> elements spread around it, that position themselves as far away from the &#8220;middle&#8221; part as they can (so that the &#8220;middle&#8221; part can be as big as it can), in HTML <a target=_blank title='HTML td element information from wschools' href='http:\/\/www.w3schools.com\/tags\/tag_td.asp'>td<\/a> (cell) elements.  Three pieces of information are associated with these buttons, namely &#8230;<\/p>\n<ol>\n<li>a label (that is displayed and is that HTML button element&#8217;s <a target=_blank title='HTML innerHTML property information' href='http:\/\/www.w3schools.com\/jsref\/prop_html_innerhtml.asp'>innerHTML<\/a> property)<\/li>\n<li>a title containing a URL to reach the &#8220;tutorial web application&#8221; as above<\/li>\n<li>an onclick event, the function called passing across a <i>this<\/i> var<font size=1>iable<\/font> pointing at the HTML button element and a URL to reach the &#8220;tutorial (itself)&#8221; as above<\/li>\n<\/ol>\n<p>That all sounds a pretty generic plan, but today we have a &#8220;Primer&#8221; tutorial, as proof of concept, which hardcodes all the HTML button element features as above on the theme (which is contained in a global var<font size=1>iable<\/font> called &#8220;theme&#8221;) of <a target=_blank title='ESL information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/English_as_a_second_or_foreign_language'>ESL<\/a>.  We chose this &#8220;theme&#8221; because we have quite a varied lineup that would benefit from a web application coalescing some of the ideas we&#8217;ve been developing here at this blog.<\/p>\n<p>Over time, you can be pretty sure we&#8217;ll be genericising all this in a variety of directions.   We hope you stick around to see this.<\/p>\n<p>By the way, the CSS &#8220;overlay&#8221; usual suspects come into play again today, the main two being &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS position:absolute information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp'>position:absolute<\/a> property<\/li>\n<li><a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a><\/li>\n<\/ul>\n<p> &#8230; and we use the Window.<a target=_blank title='Information about Window.getComputedStyle' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/getComputedStyle'>getComputedStyle<\/a> Javascript functionality to help position that middle &#8220;overlay&#8221; HTML iframe element, as well as CSS <a target=_blank title='CSS float property information from w3schools' href='http:\/\/www.w3schools.com\/css\/css_float.asp'>float<\/a> and  <a target=_blank title='CSS vertical-align property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_vertical-align.asp'>vertical-align<\/a> properties.  Again, as was the case with <a target=_blank title='Landing Page Mobile Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-mobile-tutorial\/'>Landing Page Mobile Tutorial<\/a>, we use Javascript that performs a little like a server language like PHP, holding back on the production of the HTML via that HTML being defined in a var<font size=1>iable<\/font> capable of being modified and &#8220;tweaked&#8221;, until ready to release via the use of the Javascript DOM <a target=_blank title='Javascript DOM document.write method information from wschools' href='http:\/\/www.w3schools.com\/jsref\/met_doc_write.asp'>document.write<\/a>([that variable]) method, used to set off the bulk of the web page rendering at the web browser.<\/p>\n<p>In the meantime, have a look at our HTML and Javascript and CSS programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html_GETME\" title='middle_interest.html'>middle_interest.html<\/a> and\/or try a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/middle_interest.html\" title='click picture'>live run<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#20146' onclick='var dv=document.getElementById(\"d20146\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/esl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d20146' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#20241' onclick='var dv=document.getElementById(\"d20241\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/html\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d20241' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#20256' onclick='var dv=document.getElementById(\"d20256\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d20256' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Some days ago we left off with HTML\/Javascript Themed Supervision Primer Tutorial having a pretty hardcoded feel to it, as a web application gathering together other web applications under the concept of &#8220;ESL Ideas&#8221;. Then yesterday we started on our &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-themed-supervision-second-genericization-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13,37],"tags":[1580,281,352,354,396,409,446,1801,576,587,617,652,894,997,1222,1238,1319,1345,1802],"class_list":["post-20256","post","type-post","status-publish","format-standard","hentry","category-elearning","category-esl","category-tutorials","tag-cell","tag-css","tag-document-write","tag-dom","tag-esl","tag-external-javascript","tag-float","tag-getcomputedstyle","tag-html","tag-iframe","tag-interactive","tag-javascript","tag-overlay","tag-programming","tag-supervisor","tag-table","tag-tutorial","tag-url","tag-vertical-align"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/20256"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=20256"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/20256\/revisions"}],"predecessor-version":[{"id":20268,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/20256\/revisions\/20268"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=20256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=20256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=20256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}