{"id":67813,"date":"2025-03-29T03:01:00","date_gmt":"2025-03-28T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=67813"},"modified":"2025-03-29T11:46:13","modified_gmt":"2025-03-29T01:46:13","slug":"code-download-table-long-hover-and-right-click-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-long-hover-and-right-click-tutorial\/","title":{"rendered":"Code Download Table Long Hover and Right Click Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Download Table Long Hover and Right Click Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_long_hover.gif\" title=\"Code Download Table Long Hover and Right Click Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Code Download Table Long Hover and Right Click Tutorial<\/p><\/div>\n<p>We&#8217;re revisiting the inhouse Code Download Table mentioned in <a title='Code Download Table Difference Functional Hover Tutorial' href='#cdtdfht'>Code Download Table Difference Functional Hover Tutorial<\/a> and in the time between postings we&#8217;ve noticed new functionality to try to achieve, and new methods to get to that functionality, and new ways to do that functionality.<\/p>\n<p>When adding new functionality, unless it has to interface to older functionalities, why risk those older working functionalities, if it&#8217;s possible to introduce &#8230;<\/p>\n<blockquote><p>\nevent independent methodologies\n<\/p><\/blockquote>\n<p> &#8230; relating to <i>event<\/i> types not within the scope of the older working work?  With this in mind, we&#8217;ve introduced &#8230;<\/p>\n<ul>\n<li>non-mobile <i>oncontextmenu<\/i> (ie. right click)<\/li>\n<li>non-mobile &#8220;inhouse long hover <font size=1>(of 10 seconds)<\/font>&#8221; (ie. combination of <i>onmouseover<\/i> and <i>onmouseout<\/i>)<\/li>\n<li>mobile <i>ontouchend<\/i> (ie. spread or pinch gesture)<\/li>\n<\/ul>\n<p> &#8230; isolated in scope to the column 2 GETME &#8220;a&#8221; links, via &#8230;<\/p>\n<p><code><br \/>\nsetTimeout(function(){<br \/>\n  var asis=document.getElementsByTagName('a');<br \/>\n  for (var iasis=0; iasis&lt;asis.length; iasis++) {<br \/>\n    if (('' + asis[iasis].title) == '' && ('' + asis[iasis].href) != '') {<br \/>\n       asis[iasis].title='Click\/tap navigates to ' + asis[iasis].href;<br \/>\n       asis[iasis].oncontextmenu=function(event){ onrightclickask(event);  };<br \/>\n       if (('' + asis[iasis].href + '~').indexOf('\/' + asis[iasis].innerHTML + '~') != -1) {<br \/>\n       asis[iasis].onmouseout=function(event){ startcounter=0;  event.target.setAttribute('data-ston','y');   if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + ''; }  };<br \/>\n       asis[iasis].onmouseover=function(event){ if (startcounter == 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == 'y') { event.target.setAttribute('data-ston','Y'); startcounter=1; } if (startcounter == 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == '') { event.target.setAttribute('data-ston','y'); startcounter=1; if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + '  '; event.target.setAttribute('data-ston','Y'); }  setInterval(function(){   if (startcounter &gt; 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == 'Y') { startcounter++;  event.target.title+=' '; if (startcounter &gt;= 10) { event.target.getAttribute('data-ston','y'); startcounter=0;   if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + ''; }  window.open(event.target.href,'_blank','top=50,left=150,width=600,height=600');  } }   }, 1000); }  };<br \/>\n       }<br \/>\n    } else if (('' + asis[iasis].title).indexOf('lick\/tap navigates to ') == -1 && ('' + asis[iasis].href) != '') {<br \/>\n       asis[iasis].title+=' ... Click\/tap navigates to ' + asis[iasis].href;<br \/>\n       asis[iasis].oncontextmenu=function(event){ onrightclickask(event);  };<br \/>\n       if (('' + asis[iasis].href + '~').indexOf('\/' + asis[iasis].innerHTML + '~') != -1) {<br \/>\n       asis[iasis].onmouseout=function(event){ startcounter=0;   event.target.setAttribute('data-ston','y');   if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + ''; }  };<br \/>\n       asis[iasis].onmouseover=function(event){ if (startcounter == 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == 'y') { event.target.setAttribute('data-ston','Y'); startcounter=1;  }  if (startcounter == 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == '') { event.target.setAttribute('data-ston','y'); startcounter=1; if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + '  '; event.target.setAttribute('data-ston','Y'); } setInterval(function(){   if (startcounter &gt; 0 && ('' + event.target.getAttribute('data-ston')).replace(\/^undefined\/g,'').replace(\/^null\/g,'') == 'Y') { startcounter++;   event.target.title+=' '; if (startcounter &gt;= 10) { event.target.getAttribute('data-ston','y');  startcounter=0;   if (event.target.title.indexOf(event.target.href) != -1) {  event.target.title=event.target.title.split(event.target.href)[0] + event.target.href + ''; }  window.open(event.target.href,'_blank','top=50,left=150,width=600,height=600');  } }   }, 1000); }  };<br \/>\n       }<br \/>\n    }<br \/>\n  }<br \/>\n}, 5000); \/\/ was 12000<br \/>\n<br \/>\nfunction onrightclickask(evt) {<br \/>\n  \/\/ &lt;a target=\"_blank\" title=\"1.html_GETME ... Click\/tap navigates to https:\/\/www.rjmprogramming.com.au\/NetBeans\/HTML5\/BackBone\/public_html\/1.html_GETME\" href=\"NetBeans\/HTML5\/BackBone\/public_html\/1.html_GETME\"&gt;1.html_GETME&lt;\/a&gt;<br \/>\n  \/\/ &lt;a target=\"_blank\" title=\"Breadcrumb tag (may not be found)\" href=\"\/\/www.rjmprogramming.com.au\/wordpress\/?tag=NetBeans\"&gt;NetBeans&lt;\/a&gt;<br \/>\n  if (('' + evt.target.href + '~').indexOf('\/' + evt.target.innerHTML + '~') != -1) {<br \/>\n    \/\/alert('Right click detected for ' + evt.target.href + '~ finding \/' + evt.target.innerHTML + '~');<br \/>\n    \/\/var sx=prompt('https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=' + encodeURIComponent(evt.target.href) + '&two=' + encodeURIComponent(evt.target.href), 'https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=' + encodeURIComponent(evt.target.href) + '&two=' + encodeURIComponent(evt.target.href));<br \/>\n    if (evt.target.innerHTML.indexOf('-GETME') != -1) {<br \/>\n    setTimeout(function(){ window.open('\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=' + ('\/\/' + evt.target.href.split('\/\/')[1]) + '#&two=' + ('\/\/' + evt.target.href.split('\/\/')[1]),'_blank','top=60,left=160,width=600,height=600');  }, 4000);<br \/>\n    } else {<br \/>\n    setTimeout(function(){ window.open(('\/\/' + evt.target.href.split('\/\/')[1]) + '#&two=' + ('\/\/' + evt.target.href.split('\/\/')[1]),'_blank','top=40,left=140,width=600,height=600');  }, 4000);<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nif (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n     setTimeout(function(){<br \/>\n     document.ontouchend=function(e){<br \/>\n       if (e.target.outerHTML.indexOf('&lt;a ') == 0) {<br \/>\n        if (('' + e.target.href + '~').indexOf('\/' + e.target.innerHTML + '~') != -1) {<br \/>\n         onrightclickask(e);<br \/>\n        }<br \/>\n       }<br \/>\n     };<br \/>\n     }, 4000);<br \/>\n}<br \/>\n<\/code><\/p>\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\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js------GETME\" rel=\"noopener\">getmelist.js<\/a> external Javascript code file which go to make up part of our inhouse <a target=\"_blank\" title='Code Download Table' href='http:\/\/www.rjmprogramming.com.au\/getmelist.htm' rel=\"noopener\">Code Download Table<\/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-download-table-long-hover-and-right-click-tutorial\/' rel=\"noopener\">Code Download Table Long Hover and Right Click 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\/' rel=\"noopener\">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\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Code Download Table Difference Functional Hover Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff_hover.jpg\" title=\"Code Download Table Difference Functional 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' rel=\"noopener\">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' rel=\"noopener\">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\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php-------GETME\" rel=\"noopener\">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\/' rel=\"noopener\">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\/' rel=\"noopener\">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\" rel=\"noopener\"><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' rel=\"noopener\">... 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\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js-----GETME\" rel=\"noopener\">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\" rel=\"noopener\">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' rel=\"noopener\">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\/' rel=\"noopener\">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\/' rel=\"noopener\">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\" rel=\"noopener\"><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\" rel=\"noopener\">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' rel=\"noopener\">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' rel=\"noopener\">Ajax<\/a>\/<a target=\"_blank\" title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData' rel=\"noopener\">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\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js----GETME\" rel=\"noopener\">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\" rel=\"noopener\">live run<\/a> link).<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" Download Table Multiple Row Email Report rel=\"noopener\">.<\/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\/' rel=\"noopener\">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\" rel=\"noopener\"><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\/' rel=\"noopener\">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' rel=\"noopener\">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' rel=\"noopener\">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\" rel=\"noopener\">a changed<\/a> <a target=\"_blank\" title=\"getmelist.js\" href=\"http:\/\/www.rjmprogramming.com.au\/getmelist.js---GETME\" rel=\"noopener\">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\" rel=\"noopener\">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\/' rel=\"noopener\">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\/' rel=\"noopener\">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\" rel=\"noopener\"><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' rel=\"noopener\">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\" rel=\"noopener\">download_copier.ksh<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/download_copier.ksh-GETME\" title=\"download_copier.ksh\" rel=\"noopener\">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\/' rel=\"noopener\">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\/' rel=\"noopener\">&#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\" rel=\"noopener\">the changed PHP<\/a> <a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/toggle_download.php-GETME\" title=\"toggle_download.php\" rel=\"noopener\">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' rel=\"noopener\">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\/' rel=\"noopener\">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\/' rel=\"noopener\">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\" rel=\"noopener\"><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' rel=\"noopener\">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\" rel=\"noopener\">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' rel=\"noopener\">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\" rel=\"noopener\">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' rel=\"noopener\">\/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' rel=\"noopener\">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='#d67813' onclick='var dv=document.getElementById(\"d67813\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/table\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d67813' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re revisiting the inhouse Code Download Table mentioned in Code Download Table Difference Functional Hover Tutorial and in the time between postings we&#8217;ve noticed new functionality to try to achieve, and new methods to get to that functionality, and new &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/code-download-table-long-hover-and-right-click-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,37],"tags":[211,218,360,400,488,1608,3000,861,3987,1661,871,872,997,1069,1166,1238,1319],"class_list":["post-67813","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-click","tag-code","tag-download","tag-event","tag-getme","tag-hover","tag-long-hover","tag-onclick","tag-oncontextmenu","tag-onmouseout","tag-onmouseover","tag-ontouchend","tag-programming","tag-right-click","tag-software-2","tag-table","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67813"}],"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=67813"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67813\/revisions"}],"predecessor-version":[{"id":67823,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67813\/revisions\/67823"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=67813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=67813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=67813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}