{"id":59686,"date":"2023-06-12T03:01:34","date_gmt":"2023-06-11T17:01:34","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=59686"},"modified":"2023-06-10T20:01:57","modified_gmt":"2023-06-10T10:01:57","slug":"code-difference-saved-user-settings-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-saved-user-settings-tutorial\/","title":{"rendered":"Code Difference Saved User Settings Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Difference Saved User Settings Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_remember_style.jpg\" title=\"Code Difference Saved User Settings Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Difference Saved User Settings Tutorial<\/p><\/div>\n<p>As a <a target=_blank title='PHP information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/PHP'>PHP<\/a> programmer it is easy to admire &#8230;<\/p>\n<ul>\n<li>the server side file and database and operating system smarts of the great serverside language PHP is &#8230; all while &#8230;<\/li>\n<li>PHP writing out HTML (with its CSS and Javascript) has a web application able to access all that clientside intelligence<\/li>\n<\/ul>\n<p> &#8230; and with this in mind, we allow for saved CSS styling user settings, as of today, with our Difference Report web application arrangements.<\/p>\n<p>Don&#8217;t we need a database for this?  Well, that is possible, and with serverside PHP, could be done, but we opt for clientside window.<a target=_blank title='window.localStorage information from W3schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp'>localStorage<\/a> usage to &#8230;<\/p>\n<ul>\n<li>Save user CSS styling settings<\/li>\n<li>Recall user CSS styling settings<\/li>\n<\/ul>\n<p> &#8230; so that a user might opt to &#8220;set and forget&#8221; their preferred set of &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-colour-coding-tutorial\/'>\n<ul>\n<li><span><font size=2 color=purple>New additional<\/font><\/span><\/li>\n<li><span><font size=2 color=magenta>Changed single <\/font><font size=2 color=indigo> line<\/font><\/span><\/li>\n<li><span><font size=2 color=blue>New block of lines<\/font><\/span><\/li>\n<li><span><font size=2 color=orange>Deleted lines<\/font><\/span><\/li>\n<li><span><font size=2 color=darkgreen>Changed multiple <\/font><font size=2 color=olive>lines<\/font><\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; (CSS Selector) sensitive &#8220;categories&#8221; of Difference Report data type settings.<\/p>\n<p>As a result, building on yesterday&#8217;s <a title='Code Difference User Settings Tutorial' href='#cdust'>Code Difference User Settings Tutorial<\/a>, the deployment of CSS selector logic, in PHP, now changes to &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$style=\"&lt;style&gt; font { text-shadow: -1px 1px 1px #ff2d95; } &lt;\/style&gt;\";<br \/>\n$legend=\"\";<br \/>\n$mx=\"\";<br \/>\n$onecommand=\" function nocaret(invx) { var outvx=decodeURIComponent(invx); while (outvx.indexOf('&lt;') &gt; outvx.indexOf('&gt;')) { outvx=outvx.replace('&gt;' + outvx.split('&gt;')[1].split('&lt;')[0] + '&lt;','');  }  return encodeURIComponent(outvx); } function onb(event) { var othis=event.target, cih='';  if (('' + othis.id + ' ').substring(0,1) == 'f') {  cih=('' + window.localStorage.getItem('diff_' + othis.id)).replace(\/^undefined$\/g,''.replace(\/^null$\/g,'')); if (('' + othis.innerHTML.replace(\/\\&nbsp\\;\/g,' ') + '~~').indexOf(' ~~') != -1) { if (cih == '') { window.localStorage.setItem('diff_' + othis.id, encodeURIComponent('14 &gt;' + othis.innerText + '&lt;'));  } else { window.localStorage.removeItem('diff_' + othis.id);  window.localStorage.setItem('diff_' + othis.id, nocaret(cih) + encodeURIComponent(' &gt;' + othis.innerText + '&lt;'));  } }  } } function blurize(othis) { if (1 == 2) { othis.onblur=function(event) { onb(event); }; } return othis; } function perhapsih(insg,ofo) { if (insg.indexOf('&lt;') &gt; insg.indexOf('&lt;') && insg.indexOf('&lt;') != -1) { ofo.innerHTML=insg.split('&gt;')[1].split('&gt;')[0]; ofo.setAttribute('data-ih', insg.split('&gt;')[1].split('&gt;')[0]); return insg.replace('&gt;' + insg.split('&gt;')[1].split('&gt;')[0] + '&lt;', '');  } } function givef(idn,cssis) { if (('' + document.getElementById('f' + idn).title).indexOf(' ' + decodeURIComponent(cssis) + ' ') == -1) { document.getElementById('f' + idn).title=document.getElementById('lspan').title + '  You have user CSS styling friendly one off setting of ' + decodeURIComponent(cssis) + ' for this category of Difference Reporting'; } } function getmaybe(foin,defis) { var mgs=document.URL.split(foin.id + '='); thatget=('' + window.localStorage.getItem('diff_' + foin.id)).replace(\/^undefined$\/g,'').replace(\/^null$\/g,''); if (thatget != '') { if (eval('' + mgs.length) == 1) { return decodeURIComponent(thatget); } else if (mgs[1].split('&')[0].split('#')[0] == '') { return decodeURIComponent(thatget); } } if (eval('' + mgs.length) &gt; 1) { if (mgs[1].split('&')[0].split('#')[0] != '') { return decodeURIComponent(mgs[1].split('&')[0].split('#')[0]); } } return defis; } function getany() { var mgs=[],addget='',thisget=''; if (document.URL.replace('?','&').indexOf('&f') == -1 || 1 == 1) { for (var iig=0; iig&lt;=6; iig++) { mgs=document.URL.split('f' + iig + '='); thisget=('' + window.localStorage.getItem('diff_f' + iig)).replace(\/^undefined$\/g,'').replace(\/^null$\/g,''); if (thisget != '') { document.getElementById('f' + iig).title=document.getElementById('lspan').title + '  You have user CSS styling friendly setting of ' + decodeURIComponent(thisget) + ' for this category of Difference Reporting'; } if (eval('' + mgs.length) &gt; 1) { if (mgs[1].split('&')[0].split('#')[0] != '') { document.getElementById('f' + iig).title=document.getElementById('lspan').title + '  You have user CSS styling friendly setting of ' + decodeURIComponent(mgs[1].split('&')[0].split('#')[0]) + ' for this category of Difference Reporting'; } } if (document.URL.replace('?','&').indexOf('&f' + iig + '=') == -1) { addget+='&f' + iig + '=' + thisget; } }  } if (addget != '') { location.href=(document.URL.split('#')[0] + addget).replace('.php&','.php?');  } } setTimeout(getany,2000); function removeany(newfo) { window.localStorage.removeItem('diff_' + newfo.id); } function addany(newishfo,newwhat) { removeany(newishfo);  window.localStorage.setItem('diff_' + newishfo.id, newwhat); } function askabout(fo) { var defd='14', ccol='black', ccols=fo.outerHTML.split(' color=' + String.fromCharCode(34)), psizes=fo.outerHTML.split('px'); if (eval('' + ccols.length) &gt; 1) {  ccol=ccols[1].split(String.fromCharCode(34))[0];  }  if (eval('' + psizes.length) &gt; 1) {  defd=psizes[0].split(':')[eval(-1 + psizes[0].split(':').length)].trim();  }  var numis=prompt('How many px (ie. pixels) do you want for the font size of these ' + fo.innerHTML + ' parts of report?  Optionally append after a space a colour that is not the default colour ' + ccol + ' for this category of difference report.  Optionally append after a space any other styling you want ( eg. text-shadow: -1px 1px 1px #ff2d95; ).  <font color=blue>Append spaces to save for other Coding Difference Report sessions into the future.  Prefix with minus ( ie. - ) to forget any remembered setting.    An entry can be &gt; followed by a new wording for this category followed by &lt;<\/font>', getmaybe(fo,defd)); if (numis != null) { if ((perhapsih(numis,fo) + 'x').trim().substring(0,1) == '-') { removeany(fo); numis=numis.replace('-','');  } if (('' + numis).trim() != '') { if (numis.replace(\/\\ $\/g,'') != numis) { addany(fo,encodeURIComponent(numis.trim())); } location.href=(document.URL.split('#')[0] + '&' + fo.id + '=' + encodeURIComponent(numis.trim())).replace('.php&','.php?'); } } } \";<br \/>\nif (isset($_GET['f0']) || isset($_GET['f1']) || isset($_GET['f2']) || isset($_GET['f3']) || isset($_GET['f4']) || isset($_GET['f5']) || isset($_GET['f6'])) {<br \/>\n   $onecommand.=\" function sizefonts() {   }     setTimeout(sizefonts, 3000); \";<br \/>\n   for ($ij=0; $ij&lt;=6; $ij++) {<br \/>\n   if (isset($_GET['f' . $ij])) {<br \/>\n     $ihbit=\"\";<br \/>\n     $words=str_replace('+',' ',urldecode($_GET['f' . $ij]));<br \/>\n     if (strpos($words, '&lt;') !== false && strpos($words, '&gt;') !== false) {<br \/>\n       if (strpos($words, '&lt;') &gt; strpos($words, '&gt;')) {<br \/>\n         $ihbit=\" document.getElementById('f\" . $ij . \"').innerHTML='\" . str_replace(\"'\", \"' + String.fromCharCode(39) + '\", explode('&lt;',explode('&gt;',$words)[1])[0]) . \"'; \";<br \/>\n       }<br \/>\n     }<br \/>\n     if (trim($words) != '') {  $onecommand=str_replace(\"}    \", \" givef(\" . $ij . \",'\" . $_GET['f' . $ij] . \"'); }    \", $onecommand);  }<br \/>\n     $wordsa=explode(' ', trim($words));<br \/>\n     if (sizeof($wordsa) &gt; 1) {<br \/>\n        $words=substr($words,(1 + strlen($wordsa[0])));<br \/>\n        for ($ijj=1; $ijj&lt;sizeof($wordsa); $ijj++) {<br \/>\n          if (strpos($wordsa[$ijj], ':') === false && $ijj == 1) {<br \/>\n            $words=trim(substr($words,(0 + strlen($wordsa[$ijj]))));<br \/>\n            $style.='&lt;style&gt;  .f' . $ij . \" { font-color: \" . trim($wordsa[$ijj]) . '; } &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('f\" . $ij . \"').color='' + '\" . trim($wordsa[$ijj]) . \"'; document.getElementById('f\" . $ij . \"').style.fontColor='' + '\" . trim($wordsa[$ijj]) . \"'; }    \", $onecommand);<br \/>\n          }<br \/>\n        }<br \/>\n        if (trim($words) != '') {<br \/>\n          if (strpos($words, \"{\") !== false && strpos($words, \"}\") !== false) {<br \/>\n            $style.='&lt;style&gt; ' . $words . ' &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('dstyle').innerHTML+='&lt;style&gt; ' + '\" . $words . \" &lt;\/style&gt;'; }    \", $onecommand);<br \/>\n          } else {<br \/>\n            $style.='&lt;style&gt;  .f' . $ij . \" { \" . $words . ' } &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('dstyle').innerHTML+='&lt;style&gt;  .f\" . $ij . \" { ' + '\" . $words . \" } &lt;\/style&gt;'; }    \", $onecommand);<br \/>\n          }<br \/>\n        }<br \/>\n     }<br \/>\n     $onecommand=str_replace(\"}    \", $ihbit . \" document.getElementById('f\" . $ij . \"').style.fontSize='' + '\" . trim($wordsa[0]) . \"px'; }    \", $onecommand);<br \/>\n     $style.='&lt;style&gt;  .f' . $ij . \" { font-size: \" . trim($wordsa[0]) . 'px; } &lt;\/style&gt;';<br \/>\n   }<br \/>\n   }<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; to <font color=blue>start making this happen (including being able to change our &#8220;inhouse category&#8221; names, if you like)<\/font> in <a style=display:none; target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/diff.php-----------GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php-----------GETME\">diff.php<\/a>&#8216;s more colourful <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\" title=\"Click picture\">Code Differences helper<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-saved-user-settings-tutorial\/'>Code Difference Saved User Settings Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cdust'>Previous relevant <a target=_blank title='Code Difference User Settings Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-user-settings-tutorial\/'>Code Difference User Settings Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Difference User Settings Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_ask_style.jpg\" title=\"Code Difference User Settings Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Difference User Settings Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Code Difference Privacy Tutorial' href='#cdpt'>Code Difference Privacy Tutorial<\/a> represented too much of an echo chamber for our liking.  Where possible, we prefer functionality that the users out there can tweak themselves.<\/p>\n<p>In thinking about this, those 5 categories (involving 2 subcategories) &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-colour-coding-tutorial\/'>\n<ul>\n<li><span><font size=2 color=purple>New additional<\/font><\/span><\/li>\n<li><span><font size=2 color=magenta>Changed single <\/font><font size=2 color=indigo> line<\/font><\/span><\/li>\n<li><span><font size=2 color=blue>New block of lines<\/font><\/span><\/li>\n<li><span><font size=2 color=orange>Deleted lines<\/font><\/span><\/li>\n<li><span><font size=2 color=darkgreen>Changed multiple <\/font><font size=2 color=olive>lines<\/font><\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; were what occurred to us could be the <a target=_blank title='CSS Selectors' href='https:\/\/www.w3schools.com\/css\/css_selectors.asp'>CSS Selector<\/a> basis for us to improve the Code Difference reporting via CSS styling functionality.<\/p>\n<p>Up to today the deployment of that CSS selector logic would have had to be more complex than necessary, but today&#8217;s &#8230;<\/p>\n<ul>\n<li>giving new <i>id<\/i> and <i>class<\/i> attributes to the &#8220;legend&#8221; span id=lspan elements &#8230; and &#8230;<\/li>\n<li>equivalent <i>class<\/i> attribute to report matching element data<\/li>\n<\/ul>\n<p> &#8230; makes the deployment of CSS selector logic really easy, in PHP, as per &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$style=\"&lt;style&gt; font {  text-shadow: -1px 1px 1px #ff2d95; } &lt;\/style&gt;\";<br \/>\n$legend=\"\";<br \/>\n$mx=\"\";<br \/>\n$onecommand=\" function askabout(fo) { var defd='14', ccol='black', ccols=fo.outerHTML.split(' color=' + String.fromCharCode(34)), psizes=fo.outerHTML.split('px'); if (eval('' + ccols.length) &gt; 1) {  ccol=ccols[1].split(String.fromCharCode(34))[0];  }  if (eval('' + psizes.length) &gt; 1) {  defd=psizes[0].split(':')[eval(-1 + psizes[0].split(':').length)].trim();  }  var numis=prompt('How many px (ie. pixels) do you want for the font size of these ' + fo.innerHTML + ' parts of report?  Optionally append after a space a colour that is not the default colour ' + ccol + ' for this category of difference report.  Optionally append after a space any other styling you want ( eg. text-shadow: -1px 1px 1px #ff2d95; )', defd); if (numis != null) { if (('' + numis).trim() != '') { location.href=(document.URL.split('#')[0] + '&' + fo.id + '=' + encodeURIComponent(numis.trim())).replace('.php&','.php?'); } } } \";<br \/>\nif (isset($_GET['f0']) || isset($_GET['f1']) || isset($_GET['f2']) || isset($_GET['f3']) || isset($_GET['f4']) || isset($_GET['f5']) || isset($_GET['f6'])) {<br \/>\n   $onecommand.=\" function sizefonts() {   }     setTimeout(sizefonts, 3000); \";<br \/>\n   for ($ij=0; $ij&lt;=6; $ij++) {<br \/>\n   if (isset($_GET['f' . $ij])) {<br \/>\n     $words=str_replace('+',' ',urldecode($_GET['f' . $ij]));<br \/>\n     $wordsa=explode(' ', trim($words));<br \/>\n     if (sizeof($wordsa) &gt; 1) {<br \/>\n        $words=substr($words,(1 + strlen($wordsa[0])));<br \/>\n        for ($ijj=1; $ijj&lt;sizeof($wordsa); $ijj++) {<br \/>\n          if (strpos($wordsa[$ijj], ':') === false && $ijj == 1) {<br \/>\n            $words=trim(substr($words,(0 + strlen($wordsa[$ijj]))));<br \/>\n            $style.='&lt;style&gt;  .f' . $ij . \" { font-color: \" . trim($wordsa[$ijj]) . '; } &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('f\" . $ij . \"').color='' + '\" . trim($wordsa[$ijj]) . \"'; document.getElementById('f\" . $ij . \"').style.fontColor='' + '\" . trim($wordsa[$ijj]) . \"'; }    \", $onecommand);<br \/>\n          }<br \/>\n        }<br \/>\n        if (trim($words) != '') {<br \/>\n          if (strpos($words, \"{\") !== false && strpos($words, \"}\") !== false) {<br \/>\n            $style.='&lt;style&gt; ' . $words . ' &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('dstyle').innerHTML+='&lt;style&gt; ' + '\" . $words . \" &lt;\/style&gt;'; }    \", $onecommand);<br \/>\n          } else {<br \/>\n            $style.='&lt;style&gt;  .f' . $ij . \" { \" . $words . ' } &lt;\/style&gt;';<br \/>\n            $onecommand=str_replace(\"}    \", \" document.getElementById('dstyle').innerHTML+='&lt;style&gt;  .f\" . $ij . \" { ' + '\" . $words . \" } &lt;\/style&gt;'; }    \", $onecommand);<br \/>\n          }<br \/>\n        }<br \/>\n     }<br \/>\n     $onecommand=str_replace(\"}    \", \" document.getElementById('f\" . $ij . \"').style.fontSize='' + '\" . trim($wordsa[0]) . \"px'; }    \", $onecommand);<br \/>\n     $style.='&lt;style&gt;  .f' . $ij . \" { font-size: \" . trim($wordsa[0]) . 'px; } &lt;\/style&gt;';<br \/>\n   }<br \/>\n   }<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; user tweakable (using window.prompt interactive entry) via clickable &#8220;legend&#8221; elements in <a style=display:none; target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/diff.php----------GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php----------GETME\">diff.php<\/a>&#8216;s more colourful <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\" title=\"Click picture\">Code Differences helper<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-user-settings-tutorial\/'>Code Difference User Settings Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cdpt'>Previous relevant <a target=_blank title='Code Difference Privacy Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-privacy-tutorial\/'>Code Difference Privacy Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Difference Privacy Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_php_change_private.jpg\" title=\"Code Difference Privacy Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Difference Privacy Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Code Difference Colour Coding Tutorial' href='#cdcct'>Code Difference Colour Coding Tutorial<\/a> Difference Report modifications (still) had the inherent weakness &#8230;<\/p>\n<ul>\n<li>it was possible, but unlikely, for users to see other user generated reports, if they happened to be asking for reports at exactly the same time &#8230; because &#8230;<\/li>\n<li>we had not catered for busy traffic here &#8230; but, today &#8230;<\/li>\n<li>we cater, better, for busy online traffic &#8230; and at the same time &#8230;<\/li>\n<li>improve the privacy of the reporting on an IP address basis<\/li>\n<\/ul>\n<p>The downside, at least for us managing this, is that we do not want a build up of files belonging to difference reports long gone.  We arrange it, then, that as soon as the report is created, a window.open scenario is coded for &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    $legend='&nbsp;&lt;span id=lspan&gt;&lt;span&gt;&lt;font size=2 color=purple&gt;New additional&lt;\/font&gt;&lt;\/span&gt;&nbsp;&lt;span&gt;&lt;font size=2 color=magenta&gt;Changed single &lt;\/font&gt;&lt;font size=2 color=indigo&gt; line&lt;\/font&gt;&lt;\/span&gt;&nbsp;&lt;span&gt;&lt;font size=2 color=blue&gt;New block of lines&lt;\/font&gt;&lt;\/span&gt;&nbsp;&lt;span&gt;&lt;font size=2 color=orange&gt;Deleted lines&lt;\/font&gt;&lt;\/span&gt;&nbsp;&lt;span&gt;&lt;font size=2 color=darkgreen&gt;Changed multiple &lt;\/font&gt;&lt;font size=2 color=olive&gt;lines&lt;\/font&gt;&nbsp;&lt;a id=myaa onclick=\"var wod=window.open(' . \"'','_blank','left=100,top=100,width=600,height=600'\" . '); wod.document.write(' . \"'&lt;textarea title=' + document.URL + ' cols=120 rows=40 style=background-color:pink;&gt;' + \" . 'window.atob(' . \"'\" . trim(base64_encode(file_get_contents(\"huh\" . server_remote_addr() . \".huh\"))) . \"'\" . ') + ' . \"'&lt;\/textarea&gt;'\" . '); wod.document.title=document.URL;  \" style=text-decoration:underline;cursor:pointer;&gt;Original ...&lt;\/a&gt;&lt;\/span&gt;&lt;\/span&gt;';<br \/>\n<br \/>\n    $onecommand=\" function muchl() { if (document.getElementById('lspan').innerHTML.indexOf(\\\".atob('')\\\") != -1) { document.getElementById('lspan').innerHTML=document.getElementById('lspan').innerHTML.replace(\\\".atob('')\\\", \\\".atob('\" . trim(base64_encode(file_get_contents(\"huh\" . server_remote_addr() . \".huh\"))) . \"')\\\");  } } setTimeout(muchl,8000); \";<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; leaving the door open for us to tidy up straight away in <a style=display:none; target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/diff.php---------GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php---------GETME\">diff.php<\/a>&#8216;s more colourful <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\" title=\"Click picture\">Code Differences helper<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-privacy-tutorial\/'>Code Difference Privacy Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cdcct'>Previous relevant <a target=_blank title='Code Difference Colour Coding Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-colour-coding-tutorial\/'>Code Difference Colour Coding Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Difference Colour Coding Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_php_change.jpg\" title=\"Code Difference Colour Coding Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Difference Colour Coding Tutorial<\/p><\/div>\n<p>It&#8217;s coming up to a few years now, since we looked at the code differences reporting we offer the reader, as a way to scrutinize code changes, around here, when we presented <a title='Code Download Table Difference Functional Hover Tutorial' href='#cdtdfht'>Code Download Table Difference Functional Hover Tutorial<\/a>.  Well, we thought we might try some colour coding to perhaps lift the fog on the cryptic nature of Linux <a target=_blank title='Linux diff information' href='https:\/\/man7.org\/linux\/man-pages\/man1\/diff.1.html'>diff<\/a> (difference) command based reports.  They can be cryptic because they can feed into the automation feeding of the report into other Linux commands to facilitate ongoing editing endeavours, but we do not want to go into that here, at least today.<\/p>\n<p>But on examining the reports we came up with the following difference report &#8220;categories&#8221; if you will &#8230;<\/p>\n<ul>\n<li><span><font size=2 color=purple>New additional<\/font><\/span><\/li>\n<li><span><font size=2 color=magenta>Changed single <\/font><font size=2 color=indigo> line<\/font><\/span><\/li>\n<li><span><font size=2 color=blue>New block of lines<\/font><\/span><\/li>\n<li><span><font size=2 color=orange>Deleted lines<\/font><\/span><\/li>\n<li><span><font size=2 color=darkgreen>Changed multiple <\/font><font size=2 color=olive>lines<\/font><\/li>\n<\/ul>\n<p> &#8230; the header (of a block of interest) the dead give away, depending on the existence of &#8220;a&#8221; or &#8220;c&#8221; or &#8220;d&#8221; and\/or &#8220;,&#8221; for a common sense reinterpretation by us not visiting <a target=_blank title='Linux diff information' href='https:\/\/man7.org\/linux\/man-pages\/man1\/diff.1.html'>&#8220;man diff&#8221;<\/a> ourselves, yet, regarding this work.<\/p>\n<p>Feel free to take a look at <a style=display:none; target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/diff.php--------GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php--------GETME\">diff.php<\/a>&#8216;s more colourful <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php\" title=\"Click picture\">Code Differences helper<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-colour-coding-tutorial\/'>Code Difference Colour Coding Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cdtdfht'>Previous relevant <a target=_blank title='Code Download Table Difference Functional Hover Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-difference-functional-hover-tutorial\/'>Code Download Table Difference Functional Hover Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Download Table Multiple Row Email Hover Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_hover.jpg\" title=\"Code Download Table Multiple Row Email Hover Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Download Table Difference Functional Hover Tutorial<\/p><\/div>\n<p>Is it worth adding &#8220;onmouseover&#8221; event logic onto yesterday&#8217;s <a title='Code Download Table Difference Functional Linking Tutorial' href='#cdtdflt'>Code Download Table Difference Functional Linking Tutorial<\/a>?  You bet it is!  Just because &#8220;onmouseover&#8221; has no relevance to mobile platforms, so, obversely, developing software with version control systems is irrelevant to mobile platforms.<\/p>\n<blockquote><p>\n&#8230; <a target=_blank title='a place for everything and everything in its place' href='https:\/\/www.google.com\/search?rlz=1C5CHFA_enAU832AU832&#038;sxsrf=ALeKk00VbOxqKuQDvBDLIx7kXITiZ2c3xg%3A1596850163556&#038;ei=8_8tX5fRIZeY4-EPkLOGwA0&#038;q=a+place+for+everything+and+everything+in+its+place&#038;oq=everything+in+its+place&#038;gs_lcp=CgZwc3ktYWIQARgGMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDMgcIABCwAxBDUABYAGD4RGgBcAB4AIABAIgBAJIBAJgBAKoBB2d3cy13aXrAAQE&#038;sclient=psy-ab'>a place for everything and everything in its place<\/a> &#8230;\n<\/p><\/blockquote>\n<p> &#8230; we figure. But this is of relevance to the programmer.  Sometimes, rather than cater for all the platforms, settling on a subset (of those platforms) can be apt because &#8230;<\/p>\n<ul>\n<li>one of mobile or non-mobile subsets of platforms is irrelevant to the scenario &#8230; as for today &#8230; or &#8230;<\/li>\n<li>you try to reinvent the wheel on the pretext that you are waiting for a particular web browser or platform to allow the functionality in, into the future &#8230; you could be waiting a while, with the complexity of app arrangements going on around the net these days<\/li>\n<\/ul>\n<p>Anyway, back to the &#8220;onmouseover&#8221; event on non-mobile platforms &#8230; it was the case that this event was a favourite for the conduit towards  <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> (client) functionality.  And thinking on what we do today to nuance our Code Differences PHP web application, we were thinking &#8230;<\/p>\n<blockquote><p>\nWhat would Ajax (like to) do?\n<\/p><\/blockquote>\n<p> &#8230; and we decided Ajax would really like to &#8230;<\/p>\n<ul>\n<li>populate a &#8220;div&#8221; style=display:inline-block; element adjacent to the functional detail to inform about &#8230; but this was not possible &#8230; so, instead, we &#8230;<\/li>\n<li>populate a popup window near to the functional detail to inform about<\/li>\n<\/ul>\n<p> &#8230; for a non-mobile &#8220;hover&#8221; (ie. &#8220;onmouseover&#8221;) event.<\/p>\n<p>Along the way we add some more hashtag navigations and set up more colour coding to the output of (the optional) &#8220;functional links&#8221; Code Difference reporting.<\/p>\n<p>So take a look at <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php-------GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php-------GETME\">diff.php<\/a> Code Differences helper applied to itself below &#8230;<\/p>\n<p><iframe style='width:100%;height:800px;' src='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?linkit=y&#038;one=diff.php-------GETME' title='diff.php'><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/new-code-download-table-difference-functional-linking-tutorial\/'>New Code Download Table Difference Functional Linking Tutorial<\/a> ...<\/p>\n\n\n\n\n\n<hr>\n\n\n\n\n\n<p id='cdtdflt'>Previous relevant <a target=_blank title='Code Download Table Difference Functional Linking Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-difference-functional-linking-tutorial\/'>Code Download Table Difference Functional Linking Tutorial<\/a> is shown below.<\/p>\n\n\n\n[caption id=\"\" align=\"alignnone\" width=\"220\" caption=\"Code Download Table Difference Functional Linking Tutorial\"]<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Download Table Multiple Row Email Report Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_links.jpg\" title=\"Code Download Table Multiple Row Email Report Tutorial\"  style=\"float:left;\" \/><\/a>[\/caption]\n\n\n\n<p>Welcome to our \"Code Differences Functionality Ball\" (<font size=1><a target=_blank title='?' href='https:\/\/www.instagram.com\/p\/CDhafyPhXwI\/?igshid=1l3jxtwn0y0jq'>... or lack of interest, thereof<\/a><\/font>)!  We are gathered to congratulate the Code Difference functionality for a small nip and tuck in the powder room!  In the green corner we have ...<\/p>\n\n\n\n\n\n<ul>\n\n\n<li>yesterday's <a title='Code Download Table Multiple Row Email Report Tutorial' href='#cdtmrert'>Code Download Table Multiple Row Email Report Tutorial<\/a> new <i>\"double click\" trick<\/i> ... in <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/getmelist.js-----GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js-----GETME\">getmelist.js<\/a> external Javascript code file (that you can try out for yourself at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\" title=\"Click picture\">live run<\/a> link) ... and in the puce corner we have ...<\/li>\n\n\n\n\n<li>the ever so studious &#128214; (&amp;#128214;) new top header emoji button <i>dancing pages<\/i> for the blog you are viewing now<\/li>\n\n\n<\/ul>\n\n\n\n\n\n<p> ... both trying to help you out with PHP or Javascript (in particular) code function references, where able, linking these references to local hashtag places or external webpage references.  Get function references and you are getting into programming, we figure, but in the early days of learning to program you look at other sources of code and wonder what is going on with a functional (or object oriented method) call.  Well, we want to help.<\/p>\n\n \n\n\n\n<p>You might want to \"compare the pair\" ...<\/p>\n\n\n\n\n\n<table style=width:100%;>\n\n\n<tr>\n\n<th>Includes functional links ...<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td><iframe style='width:100%;height:800px;' src='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?linkit=y&one=diff.php------GETME' title='Has links'><\/iframe>\n\n\n<tr>\n\n<th>Does not include functional links ...<\/th>\n\n<\/tr>\n\n\n\n\n<tr>\n\n<td><iframe style='width:100%;height:800px;' src='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=diff.php------GETME' title='Has links'><\/iframe>\n<\/table>\n\n\n\n\n\n<p> ... for our <a target=_blank title='diff.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php------GETME'>diff.php<\/a> Code Difference functionality helper (of the \"tuck and nip\" variety) with the \"star\" new function ...<\/p>\n\n\n\n<code>\nfunction ofinterest($intobelinked) {\n  global $lastoi;\n  $spareintobelinked=$intobelinked;\n  $outtobelinked=$intobelinked;\n  $fns=explode(\"(\", $intobelinked);\n  for ($ifns=0; $ifns&lt;sizeof($fns); $ifns++) {\n    if ($ifns == 0) {  $outtobelinked=\"\";  }\n    if (trim($fns[$ifns]) != \"\") {\n      $fnidea=\"\";\n      $jns=strlen($fns[$ifns]);\n      $jns--;\n      if (substr(strtolower($fns[$ifns]),$jns,1) &gt;= \"a\" && substr(strtolower($fns[$ifns]),$jns,1) &lt;= \"z\") {\n        $fnidea=substr($fns[$ifns],$jns,1);\n        $jns--;\n        while (substr($fns[$ifns],$jns,1) == \".\" || substr($fns[$ifns], $jns,1) == \"_\" || (substr(strtolower($fns[$ifns]),$jns,1) &gt;= \"a\" && substr(strtolower($fns[$ifns]),$jns,1) &lt;= \"z\")) {\n          $fnidea=substr($fns[$ifns], $jns,1) . $fnidea;\n          $kns=$jns;\n          $jns--;\n          if ($jns &lt; 0) { break; }\n          if (substr($fns[$ifns],$kns,1) == \".\") { break; }\n        }\n        if ($fnidea != \"\") {\n          if (substr($fnidea,0,1) == \".\") {\n            if (strpos($outtobelinked, \"this\" . $fnidea . \"=\") !== false) {\n              $outtobelinked=str_replace(\"this\" . $fnidea . \"=\", \"this.&lt;SPAN id='\" . substr($fnidea,1) . \"' class=\\\"spanccc\\\"&gt;\" . substr($fnidea,1) . \"&lt;\/SPAN&gt;=\", $outtobelinked);\n            } else if (strpos($outtobelinked, \"this\" . $fnidea . \" =\") !== false) {\n              $outtobelinked=str_replace(\"this\" . $fnidea . \" =\", \"this.&lt;SPAN id='\" . substr($fnidea,1) . \"' class=\\\"spanccc\\\"&gt;\" . substr($fnidea,1) . \"&lt;\/SPAN&gt; =\", $outtobelinked);\n            } else if (strpos($spareintobelinked, \"this\" . $fnidea . \" =\") !== false) {\n              $spareintobelinked=str_replace(\"this\" . $fnidea . \" =\", \"this.&lt;SPAN id='\" . substr($fnidea,1) . \"' class=\\\"spanccc\\\"&gt;\" . substr($fnidea,1) . \"&lt;\/SPAN&gt; =\", $spareintobelinked);\n              $fns=explode(\"(\", $spareintobelinked);\n            } else if (strpos($spareintobelinked, \"this\" . $fnidea . \"=\") !== false) {\n              $spareintobelinked=str_replace(\"this\" . $fnidea . \"=\", \"this.&lt;SPAN id='\" . substr($fnidea,1) . \"' class=\\\"spanccc\\\"&gt;\" . substr($fnidea,1) . \"&lt;\/SPAN&gt;=\", $spareintobelinked);\n              $fns=explode(\"(\", $spareintobelinked);\n            } \n            $fnidea=substr($fnidea,1);\n            $jns++;\n          }\n        }\n        \/\/file_put_contents(\"found.this\",$fnidea);\n        if (strpos(($fns[$ifns] . \"(\"), \"function \" . $fnidea . \"(\") !== false && strpos($outtobelinked, \"&lt;SPAN id='\" . $fnidea . \"'\") === false) {\n         $outtobelinked.=substr($fns[$ifns],0,($jns + 1)) . \"&lt;SPAN id='\" . $fnidea . \"' class=\\\"spanccc\\\"&gt;\" . $fnidea  . \"&lt;\/SPAN&gt;(\";\n        } else if (strlen($fnidea) &gt; 3 && strpos($outtobelinked, \"&gt;\" . $fnidea . \"&lt;\/A&gt;\") === false  && strpos($spareintobelinked, \"&gt;\" . $fnidea . \"&lt;\/SPAN&gt;\") !== false) {\n         $outtobelinked.=substr($fns[$ifns],0,($jns + 1)) . \"&lt;A href='#\" . $fnidea . \"' class=\\\"accc\\\"&gt;\" . $fnidea  . \"&lt;\/A&gt;(\";\n        } else if (strlen($fnidea) &gt; 3 && strpos($outtobelinked, \"&gt;\" . $fnidea . \"&lt;\/A&gt;\") === false  && strpos($outtobelinked, \"&gt;\" . $fnidea . \"&lt;\/SPAN&gt;\") !== false) {\n         $outtobelinked.=substr($fns[$ifns],0,($jns + 1)) . \"&lt;A href='#\" . $fnidea . \"' class=\\\"accc\\\"&gt;\" . $fnidea  . \"&lt;\/A&gt;(\";\n        } else if (strlen($fnidea) &gt; 3 && strpos($outtobelinked, \"&gt;\" . $fnidea . \"&lt;\/A&gt;\") === false) {\n         $outtobelinked.=substr($fns[$ifns],0,($jns + 1)) . \"&lt;A target=_blank href='\/\/www.google.com\/search?q=\" . urlencode($fnidea) . \"+w3schools+php.net+computerhope' title='Google search for \" . $fnidea . \"' class=\\\"accc\\\"&gt;\" . $fnidea  . \"&lt;\/A&gt;(\";\n        } else {\n         $outtobelinked.=$fns[$ifns] . \"(\";\n        }\n      } else {\n        $outtobelinked.=$fns[$ifns] . \"(\";\n      }\n    } else {\n      $outtobelinked.=\"(\";\n    }\n  }\n  if (isset($_GET['linkit']) || isset($_POST['linkit'])) {\n   \/\/file_put_contents(\"found.b\", strlen($outtobelinked)); \n   $lastoi=$outtobelinked;\n  }\n  return $intobelinked;\n}\n<\/code>\n\n\n\n<p>As far as this WordPress blog's TwentyTen theme's good ol' header.php goes a new HTML snippet ...<\/p>\n\n\n\n<code>\n&lt;a style=\"cursor:pointer;text-decoration:none;font-size:36px;\" onclick=\"diffphpfix(this);\" title=\"Code Difference Functional Links\"&gt;&amp;#128214;&lt;\/a&gt;\n<\/code>\n\n\n\n<p> ... is helped out by a new (PHP writes) Javascript function ...<\/p>\n\n\n\n<code>\nfunction diffphpfix(oais) {\n  var adiffs=document.getElementsByTagName(\"a\");\n  for (var iuyt=0; iuyt&lt;adiffs.length; iuyt++) {\n    if (('' + adiffs[iuyt].href).indexOf('diff.php?one=') != -1) {\n      adiffs[iuyt].href=adiffs[iuyt].href.replace('?', '?linkit=y&');\n    }\n  }\n  oais.style.backgroundColor=lightgreen';\n}\n<\/code>\n\n<!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-difference-functional-linking-tutorial\/'>Code Download Table Difference Functional Linking Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cdtmrert'>Previous relevant <a target=_blank title='Code Download Table Multiple Row Email Report Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-multiple-row-email-report-tutorial\/'>Code Download Table Multiple Row Email Report Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Download Table Multiple Row Email Report Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/getmelist_multiplerow_report.jpg\" title=\"Code Download Table Multiple Row Email Report Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Download Table Multiple Row Email Report Tutorial<\/p><\/div>\n<p>Before leaving yesterday&#8217;s <a title='Download and Copy or Move Code Download Table Tutorial' href='#dcmcdtt'>Download and Copy or Move Code Download Table Tutorial<\/a> extensions to our Code Download Table functionality &#8230;<\/p>\n<ul>\n<li>add copy onto a download functionality to the Code Download Table &#8230; today, we &#8230;<\/li>\n<li>add a Multiple Row selection basis for a personalized Email Report for the user<\/li>\n<\/ul>\n<p> &#8230; as we saw that there was scope for this as a sharing mechanism for project discussions and ideas, we hope.<\/p>\n<p>Today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/getmelist_multiplerow_report.jpg\" title=\"Tutorial picture\">tutorial picture<\/a> tries to show the steps to emailing off a report of interest to a user &#8230;<\/p>\n<ol>\n<li>User clicks the &#8220;Allow Multiple Row Clicks&#8221; checkbox &#8230;<br \/>\n<code><br \/>\nprefixask=prefixask.replace('&lt;\/div&gt;', '&lt;div id=divawrc style=display:inline-block;&gt;&nbsp;&nbsp;Allow Multiple Row Clicks &lt;input onchange=\"domrows();\" id=awrc style=inline-block; type=checkbox&gt;&lt;\/input&gt;&nbsp;&lt;div id=dawrc style=display:inline-block;&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;');<br \/>\n<\/code><br \/>\n &#8230; which causes &#8230;<\/li>\n<li>&#8220;Report&#8221; button shows to its right &#8230;<br \/>\n<code><br \/>\nfunction domrows() {<br \/>\n  document.getElementById('dawrc').innerHTML='&lt;input style=inline-block; type=button onclick=treportdo(); value=Report&gt;&lt;\/input&gt;';<br \/>\n  var trsis=document.getElementsByTagName('tr');<br \/>\n  for (var itrsis=0; itrsis&lt;trsis.length; itrsis++) {<br \/>\n    trsis[itrsis].onclick = function(e) { if (e.target.innerHTML != '') { var trs=document.getElementsByTagName('tr'); for (var itrs=0; itrs&lt;trs.length; itrs++) { if (trs[itrs].outerHTML.indexOf(e.target.innerHTML) != -1) {  trs[itrs].style.border='2px dotted red'; } } } };<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; and table row <i>onclick<\/i> logic is dynamically applied to those &#8220;tr&#8221; elements\n<\/li>\n<li>User clicks somewhere within rows they are interested in seeing be included in a report (which is a snippet of the whole Code Download Table, perhaps to do with a project of interest, or a learning topic of interest)<\/li>\n<li>User optionally clicks the &#8220;Report&#8221; button &#8230;<br \/>\n<code><br \/>\nfunction treportdo() {<br \/>\n  var trsis=document.getElementsByTagName('tr');<br \/>\n  webc='&lt;html&gt;&lt;head&gt;&lt;script type=\"text\/javascript\"&gt; function emailto(eto) { <a target=_blank title='window.opener information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_opener.asp'>window.opener<\/a>.parentemailto(eto); } function xemailto(eto) { if (eto.indexOf(\"@\") != -1) {  var zhr=new XMLHttpRequest(); var zform=new FormData(); zform.append(\"inline\",\"\"); zform.append(\"to\",eto);  zform.append(\"subj\",\"Code Download Table part\");   zform.append(\"body\",document.getElementById(\"mytable\").outerHTML);   zhr.open(\"post\", \"\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php\", true);  zhr.send(zform); alert(\"Email sent to \" + eto);  } }  &lt;\/script&gt;&lt;\/head&gt;&lt;body&gt;&lt;table id=mytable&gt;&lt;\/table&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;input onblur=emailto(this.value); placeholder=\"Email to\" type=email&gt;&lt;\/input&gt;&lt;\/body&gt;&lt;\/html&gt;';<br \/>\n  for (var itrsis=0; itrsis&lt;trsis.length; itrsis++) {<br \/>\n    if (itrsis == 0) {<br \/>\n      webc=webc.replace('&lt;\/table&gt;', trsis[itrsis].outerHTML + '&lt;\/table&gt;');<br \/>\n    }<br \/>\n    if (trsis[itrsis].outerHTML.indexOf('&gt;') &gt; trsis[itrsis].outerHTML.indexOf('border:')) {<br \/>\n    if (trsis[itrsis].outerHTML.indexOf('dotted') &gt; trsis[itrsis].outerHTML.indexOf('border:')) {<br \/>\n      webc=webc.replace('&lt;\/table&gt;', trsis[itrsis].outerHTML + '&lt;\/table&gt;');<br \/>\n    }<br \/>\n    }<br \/>\n  }<br \/>\n  var woois=window.open('','_blank','top=20,left=20,width=600,height=600');<br \/>\n  woois.document.write(webc);<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; which causes a &#8230;<\/li>\n<li>New popup window opens showing the relevant snippet of Code Download Table of interest to the user &#8230; including &#8230;<\/li>\n<li>Textbox for an optional emailee entry that can be filled in &#8230; to &#8230;<\/li>\n<li>Set off <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a>\/<a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> methodology means &#8230;<br \/>\n<code><br \/>\nfunction parentemailto(eto) {<br \/>\n if (eto.indexOf(\"@\") != -1) {<br \/>\n  var zhr=new XMLHttpRequest();<br \/>\n  var zform=new FormData();<br \/>\n  zform.append(\"inline\",\"\");<br \/>\n  zform.append(\"to\",eto);<br \/>\n  zform.append(\"subj\",\"RJM Programming Code Download Table part\");<br \/>\n  zform.append(\"body\", reltoabs('&lt;table' + webc.split('&lt;\/table&gt;')[0].split('&lt;table')[1] + '&lt;\/table&gt;'));<br \/>\n  zhr.open(\"post\", \"\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php\", true);<br \/>\n  zhr.send(zform);<br \/>\n  alert(\"Email sent to \" + eto);<br \/>\n }<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; to send off an Inline HTML Email report to the emailee &#8230; including &#8230;<\/li>\n<li>Links of email can be clicked to get back to source code and other links back at the RJM Programming domain web server<\/li>\n<\/ol>\n<p> &#8230; in <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/getmelist.js----GETME\">our changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js----GETME\">getmelist.js<\/a> external Javascript code file (that you can try out for yourself at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\" title=\"Click picture\">live run<\/a> link).<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-multiple-row-email-report-tutorial\/'Code Download Table Multiple Row Email Report Tutorial<\/a>.<\/p-->\n<hr>\n<p id='dcmcdtt'>Previous relevant <a target=_blank title='Download and Copy or Move Code Download Table Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-code-download-table-tutorial\/'>Download and Copy or Move Code Download Table Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Download and Copy or Move Code Download Table Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/getmelist_download_to.jpg\" title=\"Download and Copy or Move Code Download Table Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Download and Copy or Move Code Download Table Tutorial<\/p><\/div>\n<p>After the &#8220;goings on&#8221; with the relatively recent <a target=_blank title='PHP Blog Summary Fixed Title Events Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-blog-summary-fixed-title-events-tutorial\/'>PHP Blog Summary Fixed Title Events Tutorial<\/a> we thought we were finished with &#8220;Code Download Table&#8221; functionality &#8230; but then &#8230;<\/p>\n<blockquote><p>\n &#8230; <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=-yYQ8CwZ1k8'>along came<\/a> <strike>Jones<\/strike> yesterday&#8217;s <a title='Download and Copy or Move Server Tutorial' href='#dcmst'>Download and Copy or Move Server Tutorial<\/a> &#8230;\n<\/p><\/blockquote>\n<p> &#8230; and &#8230; lo and behold &#8230; we saw a good use for the idea of &#8230;<\/p>\n<blockquote>\n<ol>\n<li>download from &#8220;the net&#8221; to a Downloads folder on your computer or device &#8230; and more often than not &#8230;<\/li>\n<li>you, the user, copies or renames this data to another location on your computer or device with command line or with operating system GUI<\/li>\n<\/ol>\n<\/blockquote>\n<p> &#8230; and allowing for that second step above be programmatical with the most apt functionality that had ever passed our cotton pickin&#8217; mind &#8230; our Code Download Table &#8230; <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=6tIaGS-UMqY&#038;t=154s'>wi&#8217; all tho&#8217; GETME&#8217;s<\/a>!<\/p>\n<p>But we don&#8217;t want to interfere too much with the Code Download Table &#8220;flow&#8221; here, so create up the top left 20 seconds worth of time (extendable by their actions) available to the user to create &#8220;download&#8221; attributes on all &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-server-tutorial\/'>\n<ul>\n<li>&#8220;a&#8221; links &#8230; with &#8230;<\/li>\n<li>&#8220;href&#8221; attribute containing &#8220;GETME&#8221; &#8230; <\/li>\n<li>but not &#8220;diff.php&#8221; &#8230; and &#8230;<\/li>\n<li>&#8220;download&#8221; attribute (the attribute necessary to &#8220;download&#8221; rather than our default displaying of source code in a new webpage)<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; plus no <i>href<\/i> attribute containing &#8220;?s=&#8221; either, for today&#8217;s purposes with <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/getmelist.js---GETME\">a changed<\/a> <a target=_blank title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js---GETME\">getmelist.js<\/a> external Javascript code file (that you can try out for yourself at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\" title=\"Click picture\">live run<\/a> link) &#8230; via its new &#8230;<\/p>\n<p><code><br \/>\nvar dnprefix=decodeURIComponent(('' + localStorage.getItem('download_copy_to_folder')).replace(\/^null$\/g,'')); \/\/.replace(\/\\+\/g,' ').replace(\/\\\\\\\\\/g, '_').replace(\/\\\/\/g, '_').replace(\/\\:\/g, '_');<br \/>\nvar delaymore=0;<br \/>\nvar prefixask='&lt;div id=firstask style=\"position:absolute;top:0px;left:0px;\"&gt;&nbsp;Download GETME? &lt;input id=dpccb style=inline-block; type=checkbox onchange=\"dogetmes(document.getElementById(' + \"'\" + 'dpcis' + \"'\" + ').value);\"&gt;&lt;\/input&gt; &lt;input style=inline-block;width:300px; onclick=\"delaymore+=20000;\" onblur=\"if (document.getElementById(' + \"'\" + 'dpccb' + \"'\" + ').checked) { dogetmes(document.getElementById(this.value); }\" type=text id=dpcis placeholder=\"Optional Download Folder Later Copy to Place via Listener\" value=\"' + dnprefix + '\"&gt;&lt;\/input&gt;&lt;\/div&gt;';<br \/>\n<br \/>\nfunction dogetmes(dpprefix) {<br \/>\n  delaymore+=20000;<br \/>\n  var asis=document.getElementsByTagName('a');<br \/>\n  if (dpprefix != dnprefix && 1 == 7) {<br \/>\n    localStorage.setItem('download_copy_to_folder', dpprefix);<br \/>\n  }<br \/>\n  for (var iasis=0; iasis&lt;asis.length; iasis++) {<br \/>\n    if (asis[iasis].href.indexOf('diff.php') == -1 && asis[iasis].href.indexOf('?s=') == -1 && asis[iasis].href.indexOf('GETME') != -1) {<br \/>\n      asis[iasis].download=dpprefix.replace(\/\\\/\/g,'_').replace(\/\\\\\\\\\/g,'_').replace(\/\\:\/g,'_') + asis[iasis].href.split('\/')[eval(-1 + asis[iasis].href.split('\/').length)];<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction nomorepa() {<br \/>\n  if (eval('' + delaymore) == 0) {<br \/>\n  if (document.getElementById('firstask')) {<br \/>\n    document.getElementById('firstask').innerHTML='';<br \/>\n  }<br \/>\n  } else {<br \/>\n    setTimeout(nomorepa, eval('' + delaymore));<br \/>\n    delaymore=0;<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction lastdivpop() {<br \/>\n  var wasih='';<br \/>\n  if (document.getElementById('lastdiv')) {<br \/>\n    if (document.getElementById('lastdiv').innerHTML == '') {<br \/>\n      wasih=wasih;<br \/>\n      setTimeout(lastdivpop, 3000);<br \/>\n    } else if (document.getElementById('lastdiv').innerHTML.indexOf('firstask') == -1) {<br \/>\n      wasih=document.getElementById('lastdiv').innerHTML;<br \/>\n      document.getElementById('lastdiv').innerHTML=prefixask + wasih;<br \/>\n      prefixask='';<br \/>\n      setTimeout(nomorepa, 20000);<br \/>\n    } else {<br \/>\n      setTimeout(lastdivpop, 3000);<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nsetTimeout(lastdivpop, 8000);<br \/>\n<\/code><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-code-download-table-tutorial\/'>Download and Copy or Move Code Download Table Tutorial<\/a>.<\/p-->\n<hr>\n<p id='dcmst'>Previous relevant <a target=_blank title='Download and Copy or Move Server Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-server-tutorial\/'>Download and Copy or Move Server Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/toggle_download_mode_practicalities_last.gif\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Download and Copy or Move Server Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/toggle_download_mode_practicalities_last.jpg\" title=\"Download and Copy or Move Server Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Download and Copy or Move Server Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Download and Copy or Move Primer Tutorial' href='#dcmpt'>Download and Copy or Move Primer Tutorial<\/a> was all about the &#8220;client side&#8221; of &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-primer-tutorial\/'>\n<ul>\n<li>the &#8220;server&#8221; side web applications\/pages &#8230; and &#8230;<\/li>\n<li>a &#8220;client&#8221; side listener (like we talked about with Korn Shell listeners with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/pandoc-document-conversion-email-tutorial\/' title='Pandoc Document Conversion Email Tutorial'>Pandoc Document Conversion Email Tutorial<\/a>)<\/li>\n<\/ul>\n<\/blockquote>\n<p> &#8230; and we&#8217;ve just &#8220;tweaked&#8221; (albeit, very importantly, in our books <font size=1>(&#8230; but the pamphlettes are still not playing ball)<\/font>) to ensure no &#8220;file clobbering&#8221; takes place so that the Korn Shell now does &#8230;<\/p>\n<p><code><br \/>\n    suf=\"\"<br \/>\n    isuf=-1<br \/>\n    while [ -f \"${dpath}\/${brest}${suf}\" ]; do<br \/>\n      ((isuf=isuf+1))<br \/>\n      suf=\"_${isuf}\"<br \/>\n    done<br \/>\n    if [ ! -z \"$suf\" ]; then<br \/>\n      echo \"mv ${dpath}\/${brest} ${dpath}\/${brest}${suf} # `date`\" &gt;&gt; download_to_place.out<br \/>\n      mv ${dpath}\/${brest} ${dpath}\/${brest}${suf} &gt;&gt; download_to_place.out 2&gt;&gt; download_to_place.err<br \/>\n    fi<br \/>\n<\/code> <\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/download_copier.ksh-GETME\" title=\"download_copier.ksh\">download_copier.ksh<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/download_copier.ksh-GETME\" title=\"download_copier.ksh\">download_copier.ksh<\/a> Korn Shell scripting on our macOS operating system &#8220;client&#8221;.<\/p>\n<p>But today is mainly about filling in the missing bits on the &#8220;server&#8221; side.  This (need for a) &#8220;conduit&#8221; we referred to yesterday is because we accept no folder paths can be mentioned at the &#8220;server&#8221; end.  Suppose, though, that the &#8220;non-pathed&#8221; filename we supply to an &#8220;a&#8221; link&#8217;s &#8220;download&#8221; attribute can be prefixed by a mildly mashed up version of that path we copy to from the Downloads folder of your &#8220;client&#8221; computer or device, as you perform a &#8220;download&#8221; via the clicking of an &#8220;a&#8221; link.<\/p>\n<p>Well, at this blog we&#8217;d already started functionality to toggle the use or not of &#8230;<\/p>\n<ul>\n<li>&#8220;a&#8221; links &#8230; with &#8230;<\/li>\n<li>&#8220;href&#8221; attribute containing &#8220;GETME&#8221; &#8230; <\/li>\n<li>but not &#8220;diff.php&#8221; &#8230; and &#8230;<\/li>\n<li>&#8220;download&#8221; attribute (the attribute necessary to &#8220;download&#8221; rather than our default displaying of source code in a new webpage)<\/li>\n<\/ul>\n<p>Were you here, then, when we published <a target=_blank title='WordPress Blog Download Mode Toggler Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-download-mode-toggler-primer-tutorial\/'>WordPress Blog Download Mode Toggler Primer Tutorial<\/a> <font size=1>(or were you indisposed again?!)<\/font>   There we established an &#8220;All Posts&#8221; menu <a target=_blank title='\"Toggle Download Mode from GETME\"' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/all-posts\/toggle-download-mode-from-getme\/'>&#8220;Toggle Download Mode from GETME&#8221;<\/a> option piece of functionality to toggle between &#8230;<\/p>\n<ul>\n<li>displaying of source code in a new webpage for GETME &#8220;a&#8221; links &#8230; versus &#8230;<\/li>\n<li>use <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/ITblog\/toggle_download.php-GETME\" title=\"toggle_download.php\">the changed PHP<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/toggle_download.php-GETME\" title=\"toggle_download.php\">toggle_download.php<\/a> in conjunction with <font color=blue>a changed<\/font> good &#8216;ol TwentyTen Theme <i>header.php<\/i> as below &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\n  if (outs == null) {<br \/>\n  <font color=blue>var dnprefix=decodeURIComponent(('' + localStorage.getItem('download_copy_to_folder')).replace(\/^null$\/g,'')).replace(\/\\+\/g,' ').replace(\/\\\\\\\\\/g, '_').replace(\/\\\/\/g, '_').replace(\/\\:\/g, '_');<\/font><br \/>\n  for (idmjk=0; idmjk&lt;admjk.length; idmjk++) {<br \/>\n    if (admjk[idmjk].href.indexOf('GETME') != -1 && admjk[idmjk].href.indexOf('diff.php') == -1) {<br \/>\n<br \/>\n      if (origcafd &lt; 0) { \/\/!cafd) {<br \/>\n      xp=admjk[idmjk].href.split(\"GETME\");<br \/>\n      prexp=xp[0].split(\"\/\");<br \/>\n      postprexp=prexp[-1 + prexp.length].split(\".\");<br \/>\n      extis = postprexp[-1 + postprexp.length].replace(\/_\/g,\"\").replace(\/-\/g,\"\").replace(\/GETME\/g,\"\");<br \/>\n      outs=\"\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&tsp=\" + (Math.floor(Math.random() * 1999900) + 100) + \"#\" + postprexp[0] + \".\" + postprexp[-1 + postprexp.length].replace(extis,\"\").replace(extis,\"\").replace(extis,\"\") + \"GETME\" + extis;<br \/>\n      aorig=admjk[idmjk].innerHTML;<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\".\",\"&lt;span data-alt='\" + outs + \"' id='spn\" + cafd + \"' title=\\\" + Code Download Table\\\" onclick=\\\"if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); }  return false; \\\"&gt;&#9899;&lt;\/span&gt;\");<br \/>\n      if (aorig == admjk[idmjk].innerHTML && admjk[idmjk].innerHTML.indexOf('er posts') == -1) admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span data-alt='\" + outs + \"' id='spn\" + cafd + \"'  title=\\\" + Code Download Table\\\" onclick=\\\"if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); }  return false; \\\"&gt;&#9898;&lt;\/span&gt;\");<br \/>\n      cafd++;<br \/>\n      } else {<br \/>\n      <font color=blue>prestuffs = admjk[idmjk].href.split('\/');<\/font><br \/>\n      newaspare = admjk[idmjk].href.replace('_-GETME', '').replace('__GETME', '').replace('_GETME', '').replace(big, '');<br \/>\n<br \/>\n      while (big.indexOf('-') != -1) {<br \/>\n<br \/>\n        big = big.replace('-', '');<br \/>\n<br \/>\n        newaspare = newaspare.replace(big, '');<br \/>\n<br \/>\n      }<br \/>\n<br \/>\n      big = '----------------------GETME';<br \/>\n      stuffs = newaspare.split('\/');<br \/>\n      <font color=blue>if (dnprefix != '') {<br \/>\n      admjk[idmjk].download = dnprefix + prestuffs[stuffs.length - 1];<br \/>\n      } else {<\/font><br \/>\n      admjk[idmjk].download = <font color=blue>dnprefix + <\/font>stuffs[stuffs.length - 1];<br \/>\n      <font color=blue>}<\/font><br \/>\n      admjk[idmjk].title = \"(Really download) \" + admjk[idmjk].title +  ' ... welcome to the long hover functionality that shows allows for a Download Mode for the blog that can be toggled';<br \/>\n      admjk[idmjk].onmouseover = \" getDownloadMode(); \";<br \/>\n      admjk[idmjk].onmouseout = \" yehBut(); \";<br \/>\n      admjk[idmjk].ontouchstart = \" getDownloadMode(); \";<br \/>\n      admjk[idmjk].ontouchend = \" yehBut(); \";<br \/>\n      }<br \/>\n    } else if (admjk[idmjk].href.indexOf('GETME') != -1 && origcafd &lt; 0) { \/\/!cafd) {<br \/>\n      xp=admjk[idmjk].href.split(\"GETME\");<br \/>\n      prexp=xp[0].split(\"\/\");<br \/>\n      postprexp=prexp[-1 + prexp.length].split(\".\");<br \/>\n      extis = postprexp[-1 + postprexp.length].replace(\/_\/g,\"\").replace(\/-\/g,\"\").replace(\/GETME\/g,\"\");<br \/>\n      outs=\"\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&tsp=\" + (Math.floor(Math.random() * 1999900) + 100) + \"#\" + postprexp[0] + \".\" + postprexp[-1 + postprexp.length].replace(extis,\"\").replace(extis,\"\").replace(extis,\"\") + \"GETME\" + extis;<br \/>\n      aorig=admjk[idmjk].innerHTML;<br \/>\n      selbitis=allthecombos((admjk[idmjk].href + '=').split('=')[1].split('&')[0]);<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\".\",\"&lt;span data-alt='\" + outs + \"' id='spn\" + cafd + \"'  title=\\\" + Code Download Table\\\" onclick=\\\"if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); }  return false; \\\"&gt;&lt;select onchange=\\\" if (this.value.length &gt; 0) { window.open(this.value,'_blank'); } return false; \\\" style='margin-bottom:0px;width:40px;' id='sel\" + cafd + \"'&gt;&lt;option value=&gt;&#9899;&lt;\/option&gt;\" + selbitis + \"&lt;\/select&gt;&lt;\/span&gt;\");<br \/>\n      if (aorig == admjk[idmjk].innerHTML && admjk[idmjk].innerHTML.indexOf('er posts') == -1) admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span data-alt='\" + outs + \"' id='spn\" + cafd + \"'  title=\\\" + Code Download Table\\\" onclick=\\\"if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); }  return false; \\\"&gt;&lt;select onchange=\\\" if (this.value.length &gt; 0) { window.open(this.value,'_blank'); } return false; \\\" style='margin-bottom:0px;width:40px;' id='sel\" + cafd + \"'&gt;&lt;option value=&gt;&#9898;&lt;\/option&gt;\" + selbitis + \"&lt;\/select&gt;&lt;\/span&gt;\");<br \/>\n      cafd++;<br \/>\n    } else if ((admjk[idmjk].innerHTML.indexOf('live run') != -1 || admjk[idmjk].title.toLowerCase().indexOf('click picture') != -1) && origcafd &lt; 0) { \/\/!cafd) {<br \/>\n      outs=\"\/\/www.rjmprogramming.com.au\/slideshow.html#tuts\";<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span data-alt='\" + outs + \"' id='spn\" + cafd + \"' title=\\\" + Cut to the Chase ... see the blog post list related to live runs and slideshows ... ie. the main point of the blog posting\\\" onclick=\\\"if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { window.open('\" + outs + \"','_blank','top=100,left=100,width=650,height=100'); }  return false; \\\"&gt;&#9986;&lt;\/span&gt;\");<br \/>\n      cafd++;<br \/>\n    }<br \/>\n  }<br \/>\n  }<br \/>\n<\/code><br \/>\n?&gt;<br \/>\n &#8230; to, depending on whether the user specifies in the &#8220;All Posts&#8221; toggling&#8217;s Javascript prompt window presented, specifies a new comma separated &#8220;client folder of interest to copy to&#8221; place (stored in window.<a target=_blank title='localStorage information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp'>localStorage<\/a>), will &#8230;<\/p>\n<ol>\n<li>download with the GETME to the Downloads folder and copy off to the specified folder of interest (backing up as necessary) &#8230; versus &#8230;<\/li>\n<li>the default download mode downloads to the Downloads folder without the GETME parts<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>See these changes in action below, contextualizing &#8220;server&#8221; and &#8220;client&#8221; codes in the full picture of assisted Downloads (copied on to a folder of the user&#8217;s interest) &#8230;<\/p>\n<p><img style='width:100%;' src='http:\/\/www.rjmprogramming.com.au\/Mac\/toggle_download_mode_practicalities_last.gif'><\/img><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-server-tutorial\/'>Download and Copy or Move Server Tutorial<\/a>.<\/p-->\n<hr>\n<p id='dcmpt'>Previous relevant <a target=_blank title='Download and Copy or Move Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/download-and-copy-or-move-primer-tutorial\/'>Download and Copy or Move 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\/Mac\/download_ksh.jpg\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Download and Copy or Move Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/download_ksh.jpg\" title=\"Download and Copy or Move Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Download and Copy or Move Primer Tutorial<\/p><\/div>\n<p>Downloading from &#8220;the net&#8221; (&#8220;server land&#8221;) to your computer or device (&#8220;client land&#8221;) is a big part of the online experience and the sharing of data over the world wide web.  But have you ever wondered about the two step design of &#8230;<\/p>\n<ol>\n<li>download from &#8220;the net&#8221; to a Downloads folder on your computer or device &#8230; and more often than not &#8230;<\/li>\n<li>you, the user, copies or renames this data to another location on your computer or device with command line or with operating system GUI<\/li>\n<\/ol>\n<p>&#8230; ? Why not allow the &#8220;server&#8221; side define where it can download to on the &#8220;client&#8221;?  Well, that would be a security nightmare, allowing a highjacking of mission critical files on your computer or device.  So, I get it, that is a &#8220;no no&#8221;.  But could we have a controlled &#8220;arrangement&#8221; between &#8230;<\/p>\n<ul>\n<li>the &#8220;server&#8221; side web applications\/pages &#8230; and &#8230;<\/li>\n<li>a &#8220;client&#8221; side listener (like we talked about with Korn Shell listeners with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/pandoc-document-conversion-email-tutorial\/' title='Pandoc Document Conversion Email Tutorial'>Pandoc Document Conversion Email Tutorial<\/a>)<\/li>\n<\/ul>\n<p> &#8230; ?  We think that sounds reasonable and so, today, we start our (two parts or more) mini-project (making step 2 above be considered to be programmatically handled, sometimes) designing a Korn Shell (&#8220;client&#8221; side) listener to suit our macOS &#8220;client&#8221; computer, executed as a background process via &#8230;<\/p>\n<p><code><br \/>\nksh <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/download_copier.ksh_GETME\" title=\"download_copier.ksh\">download_copier.ksh<\/a> &<br \/>\n<\/code><\/p>\n<p>But what is the conduit, if the &#8220;server&#8221; web applications\/pages cannot define a destination folder other than the macOS Downloads folder for the user involved?  Well, that is where we need either &#8230;<\/p>\n<ul>\n<li>Korn Shell interactive input (via <a target=_blank title='read' href='http:\/\/linuxcommand.org\/lc3_man_pages\/readh.html'>read<\/a> command) &#8230; or &#8230;\n<li>additional argument &#8230; as per example &#8230;<br \/>\n<code><br \/>\nksh <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/download_copier.ksh_GETME\" title=\"download_copier.ksh\">download_copier.ksh<\/a> <a target=_blank title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server ... this is a macOS default Document Root folder name' href='http:\/\/www.mamp.info'>\/Applications\/MAMP\/htdocs\/<\/a> &<br \/>\n<\/code><br \/>\n &#8230; if the folder to copy to is known ahead of time\n<\/li>\n<\/ul>\n<p> &#8230; to define a &#8220;client land&#8221; folder to copy to (from the user&#8217;s Download folder (receiving the downloaded data).<\/p>\n<p>That first Korn Shell <a target=_blank title='read' href='http:\/\/linuxcommand.org\/lc3_man_pages\/readh.html'>read<\/a> command interactive input was interesting to us for a command backgrounded via the &#8220;&#038;&#8221; command suffix.  But if stdin and stdout are not mentioned in the command you can answer this interactive input and then the processing the Korn Shell performs proceeds in the background.  Exactly what we were hoping for, but weren&#8217;t sure that this was the case!<\/p>\n<p>The picture is filled in better tomorrow as we discuss the conduit in more detail tomorrow.<\/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='#d49840' onclick='var dv=document.getElementById(\"d49840\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/download\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49840' 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='#d49845' onclick='var dv=document.getElementById(\"d49845\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/server\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49845' 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='#d49852' onclick='var dv=document.getElementById(\"d49852\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/code\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49852' 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='#d49865' onclick='var dv=document.getElementById(\"d49865\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/row\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49865' 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='#d49872' onclick='var dv=document.getElementById(\"d49872\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/double-click\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49872' 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='#d49887' onclick='var dv=document.getElementById(\"d49887\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/hover\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d49887' 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='#d59653' onclick='var dv=document.getElementById(\"d59653\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/colour-coding\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59653' 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='#d59666' onclick='var dv=document.getElementById(\"d59666\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/privacy\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59666' 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='#d59675' onclick='var dv=document.getElementById(\"d59675\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/interactive-entry\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59675' 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='#d59686' onclick='var dv=document.getElementById(\"d59686\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/localStorage\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d59686' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>As a PHP programmer it is easy to admire &#8230; the server side file and database and operating system smarts of the great serverside language PHP is &#8230; all while &#8230; PHP writing out HTML (with its CSS and Javascript) &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/code-difference-saved-user-settings-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,14,29,33,37],"tags":[211,212,4286,218,4357,234,2442,328,405,409,1533,617,2780,629,707,2415,860,3987,932,2976,997,3274,1054,2384,1122,3716,2821,3942,3945,1319,1891,4358,3551],"class_list":["post-59686","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-operating-system","category-software","category-tutorials","tag-click","tag-client","tag-clientside","tag-code","tag-color-coding","tag-command-line","tag-contenteditable","tag-diff","tag-exec","tag-external-javascript","tag-get","tag-interactive","tag-interactive-entry","tag-ip-address","tag-linux","tag-localstorage","tag-onblur","tag-oncontextmenu","tag-php","tag-privacy","tag-programming","tag-recall","tag-report","tag-save","tag-server","tag-serverside","tag-set","tag-shell_exec","tag-tidy","tag-tutorial","tag-user","tag-user-settings","tag-window-localstorage"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59686"}],"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=59686"}],"version-history":[{"count":10,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59686\/revisions"}],"predecessor-version":[{"id":59696,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/59686\/revisions\/59696"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=59686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=59686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=59686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}