{"id":28803,"date":"2017-03-12T03:01:55","date_gmt":"2017-03-11T17:01:55","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=28803"},"modified":"2022-04-11T17:55:55","modified_gmt":"2022-04-11T07:55:55","slug":"wordpress-code-download-table-interface-double-click-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-code-download-table-interface-double-click-tutorial\/","title":{"rendered":"WordPress Code Download Table Interface Double Click Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/wp_cd_dc.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Code Download Table Interface Double Click Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/wp_cd_dc.jpg\" title=\"WordPress Code Download Table Interface Double Click Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Code Download Table Interface Double Click Tutorial<\/p><\/div>\n<p>If you&#8217;ve been coding Javascript in a web application have you ever pondered the string functions &#8230;<\/p>\n<table>\n<tr>\n<td>\n<code><br \/>\n<a target=_blank title='Javascript includes() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_includes.asp'>includes()<\/a><br \/>\n<\/code>\n<\/td>\n<td> &#8230; versus &#8230; <\/td>\n<td>\n<code><br \/>\n<a target=_blank title='Javascript indexOf() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_indexof.asp'>indexOf()<\/a><br \/>\n<\/code>\n<\/td>\n<\/tr>\n<\/table>\n<p>?   To be honest, I haven&#8217;t much, because am always using <a target=_blank title='Javascript indexOf() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_indexof.asp'>indexOf()<\/a>, but to be fair, you might use <a target=_blank title='Javascript includes() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_includes.asp'>includes()<\/a> in a code scenario where you are trepidatious as to whether to proceed with something more involved, and are sort of just &#8220;testing the waters&#8221; so to speak, and\/or perhaps if you are doing this several thousand times, and you are not interested in anything other than one string&#8217;s <i>existence<\/i> in another.  So, thinking on it, perhaps I should get around more.<\/p>\n<p>What&#8217;s the relevance of all this?  Well, yesterday, when we presented <a title='WordPress Code Download Table Interface Primer Tutorial' href='#wcdtipt'>WordPress Code Download Table Interface Primer Tutorial<\/a>, as shown below, we showed a code snippet containing what was, for us, a very critical Javascript variable called <b>cafd<\/b> which was used in a <i>binary<\/i> (boolean) way, in that it moved from a value of <i>false<\/i> initially to a value of <i>true<\/i> for the rest, but this <i>binary<\/i> feeling design (reminiscent of an <i><a target=_blank title='Javascript includes() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_includes.asp'>includes()<\/a>&#8216;s<\/i> type of approach) is not enough for the more ambitious aims today of adding in an &#8220;on double click&#8221; two layer event logic design where a first click does different things to what the second click does.  To be honest, we get fond of our critical <i>var<\/i>iables and we wanted to just use <i>cafd<\/i> more usefully, so we rearranged its use to be that of an (integer) number, in a similar line of thinking to how <a target=_blank title='Javascript indexOf() function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_indexof.asp'>indexOf()<\/a> works (by starting with a value of -1 meaning &#8220;not found&#8221;) to having various other useful larger than zero values that are the means by which the web application, via the <i>id<\/i> property, can get back to deriving the <i>span<\/i> element object involved with the user&#8217;s click (or second part of double click).  Read more on this below.<\/p>\n<p>Now, another idea from today&#8217;s work, though not <i>spelt out<\/i> in what we do, is the extension of functionality via <i>event<\/i> thinking.  What we mean by that, is that what we did yesterday with the addition of those Emoji (<i>span<\/i> element) <i>onclick<\/i> event logics was to link the event with <i>window.open()<\/i> popup functionalities, not popular with all, but what if we were to, on that first click, instead, place the URL findings we navigate to into an &#8230;<\/p>\n<ol>\n<li><i>iframe<\/i> element, for the first click &#8230; and then onto those same &#8230;<\/li>\n<li><i>window.open()<\/i> popups on the second click (and then toggle back to the previous again, all this controlled by the existence, or not, for the Emoji <i>span<\/i> element of a <i>2px solid yellow<\/i> border)<\/li>\n<\/ol>\n<p>Notice the numbering above?  Everything is pointing at the use of the <a target=_blank title='Event ondblclick information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/event_ondblclick.asp'>ondblclick<\/a> (on double click) event here, but there are a couple of reasons we do not proceed down that route, and we want to suggest another idea, and those reasons are &#8230;<\/p>\n<ul>\n<li>double click events suited desktop applications, but my web application usage didn&#8217;t satisfy me that they were completely reliable in web application work &#8230; and anyway &#8230;<\/li>\n<li>double click events are of even less relevance for mobile use of web applications where <i>touch<\/i> event logic (where <i>onclick<\/i> is &#8220;tolerated&#8221;) is more the go<\/li>\n<\/ul>\n<p> &#8230; but we would argue the flagging of a double click being &#8220;between the two clicks&#8221; that can be checked or verified by the existence, in our case, of a &#8220;2px solid yellow&#8221; border is not a bad compromise to the real (more your early days Windows concept of) &#8220;on double click&#8221;.  You&#8217;ll see that it doesn&#8217;t even rely on timing, so you could click once &#8230; write that tome on &#8220;Thimbles of the Middle Ages&#8221; you&#8217;ve been meaning to finish, unclot the clotted cream in the fridge, play a bit of <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=oD-LvABxMsY'>golf<\/a>, and come back and do your second click, and the web application would be there waiting for you <font size=1>&#8230; no doubt expecting a tip<\/font>.<\/p>\n<p>For today, we <b>have<\/b> <font color=red>added<\/font> to <b>yesterday&#8217;s<\/b> changes (where <i><b>var cafd=<font color=red>-1; \/\/<\/font>false;<\/b><\/i> starts scripting and body onload code snippet starts <i>&lt;body onload=&#8221;  <b>changeasfordownload(); <font color=red> if (cafd == cafd) { cafd=0; } else { <\/font>cafd=true; <font color=red>}<\/font><\/b> &#8230;<\/i> &#8230;<\/p>\n<p><code><br \/>\nfunction changeasfordownload() {<br \/>\n  var <b><font color=red>origcafd=cafd,<\/font>outs<font color=red>=null<\/font>,extis,postprexp,prexp,xp,aorig, <\/b>idmjk=0, newaspare='', big='----------------------GETME', stuffs;<br \/>\n  var admjk = document.getElementsByTagName('a');<br \/>\n<font color=red><br \/>\n  if (cafd &lt; 0) {<br \/>\n    cafd=1000;<br \/>\n  } else if (cafd &gt; 0) {<br \/>\n    outs=document.getElementById('spn' + cafd);<br \/>\n    if (origcafd &gt; 0) {<br \/>\n      if (outs != null) {<br \/>\n       if (outs.style.border == null || outs.style.border == '') {<br \/>\n          xp=outs.getAttribute(\"data-alt\");<br \/>\n          if (outs.innerHTML.indexOf('&lt;iframe ') == -1) {<br \/>\n          if (xp.indexOf(\"slideshow.htm\") != -1) {<br \/>\n          outs.innerHTML+='&lt;br&gt;&lt;iframe src=\"' + xp + '\" title=\"' + xp + '\" style=\"width:100%;height:100px;\"&gt;&lt;\/iframe&gt;&lt;br&gt;';<br \/>\n\t\t  } else {<br \/>\n          outs.innerHTML+='&lt;br&gt;&lt;iframe src=\"' + xp + '\" title=\"' + xp + '\" style=\"width:100%;height:500px;\"&gt;&lt;\/iframe&gt;&lt;br&gt;';<br \/>\n\t\t  }<br \/>\n\t\t  }<br \/>\n\t\t  outs.style.border='2px solid yellow';<br \/>\n\t\t  outs.title+=' (to new window)';<br \/>\n       } else {<br \/>\n          xp=outs.getAttribute(\"data-alt\");<br \/>\n          if (xp.indexOf(\"slideshow.htm\") != -1) {<br \/>\n          window.open(xp,\"_blank\",\"top=100,left=100,width=650,height=100\");<br \/>\n\t\t  } else {<br \/>\n          window.open(xp,\"_blank\",\"top=100,left=100,width=500,height=500\");<br \/>\n\t\t  }<br \/>\n\t\t  outs.style.border='';<br \/>\n\t\t  outs.title=outs.title.replace(' (to new window)','');<br \/>\n       }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n  if (outs == null) {<br \/>\n<\/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      <b>if (<font color=red>origcafd < 0) { \/\/<\/font>!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=\"http:\/\/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<font color=red> data-alt='\" + outs + \"' id='spn\" + cafd + \"'<\/font> title=\\\" + Code Download Table\\\" onclick=\\\"<font color=red>if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { <\/font>window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); <font color=red>}<\/font>\\\"&gt;&amp;#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<font color=red> data-alt='\" + outs + \"' id='spn\" + cafd + \"'<\/font> title=\\\" + Code Download Table\\\" onclick=\\\"<font color=red>if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { <\/font>window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); <font color=red>}<\/font>\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n      } else {<\/b><br \/>\n      newaspare = admjk[idmjk].href.replace('_-GETME', '').replace('__GETME', '').replace('_GETME', '').replace(big, '');<br \/>\n      while (big.indexOf('-') != -1) {<br \/>\n        big = big.replace('-', '');<br \/>\n        newaspare = newaspare.replace(big, '');<br \/>\n      }<br \/>\n      big = '----------------------GETME';<br \/>\n      stuffs = newaspare.split('\/');<br \/>\n      admjk[idmjk].download = stuffs[stuffs.length - 1];<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      <b>}<br \/>\n    } else if (admjk[idmjk].href.indexOf('GETME') != -1 && <font color=red>origcafd < 0) { \/\/<\/font>!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=\"http:\/\/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<font color=red> data-alt='\" + outs + \"' id='spn\" + cafd + \"'<\/font> title=\\\" + Code Download Table\\\" onclick=\\\"<font color=red>if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { <\/font>window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); <font color=red>}<\/font>\\\"&gt;&amp;#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<font color=red> data-alt='\" + outs + \"' id='spn\" + cafd + \"'<\/font> title=\\\" + Code Download Table\\\" onclick=\\\"<font color=red>if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { <\/font>window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500'); <font color=red>}<\/font>\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n    } else if (admjk[idmjk].innerHTML.indexOf('live run') != -1 && <font color=red>origcafd < 0) { \/\/<\/font>!cafd) {<br \/>\n      outs=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts\";<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span<font color=red> data-alt='\" + outs + \"' id='spn\" + cafd + \"'<\/font> 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=\\\"<font color=red>if (cafd == cafd) { cafd=\" + cafd + \"; changeasfordownload(); } else { <\/font>window.open('\" + outs + \"','_blank','top=100,left=100,width=650,height=100'); <font color=red>}<\/font>\\\"&gt;&amp;#9986;&lt;\/span&gt;\");<br \/>\n    <\/b>}<br \/>\n  }<br \/>\n  <font color=red>}<\/font><br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; (still) for today&#8217;s good ol&#8217; <i>header.php<\/i> <font color=red>reworked<\/font> changes to our WordPress blog PHP coding.   One last thing about this (PHP writing out) Javascript code came about from the fact that, unlike the HTML img element for example, the HTML span element does not recognize the <i>alt<\/i> property, which we tried, but when we failed, we resorted to using the excellent Javascript global data attributes approach (which we have talked about before at this blog) via the use of the Javascript <a target=_blank title='Javascript getAttribute() information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_element_getattribute.asp'>getAttribute()<\/a> function.<\/p>\n<hr>\n<p id='wcdtipt'>Previous relevant <a target=_blank title='WordPress Code Download Table Interface Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-code-download-table-interface-primer-tutorial\/'>WordPress Code Download Table Interface 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\/wordpress\/wp_cd.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Code Download Table Interface Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/wp_cd.jpg\" title=\"WordPress Code Download Table Interface Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Code Download Table Interface Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve got three basic concepts floating around the way we present software and share it around, at this blog, those being &#8230;<\/p>\n<ol>\n<li>the idea of a live run link pointing at an executable piece of software, at least as far as our web server is concerned<\/li>\n<li>a link to downloadable source code of the version of software code pertinent to the version of interest to the current blog posting<\/li>\n<li>a differences link that compares the software code above to a version more &#8220;junior&#8221; (or older &#8230; huh?) to it<\/li>\n<\/ol>\n<p>We want to add an Emoji driven &#8220;drilling down&#8221; functionality to this for those users who want more information, or more context, or both.<\/p>\n<p>So we&#8217;ve added these Emojis below, respectively, for those purposes &#8230;<\/p>\n<ol>\n<li><span title=\" + Cut to the Chase ... see the blog post list related to live runs and slideshows ... ie. the main point of the blog posting\">&#9986;<\/span><\/li>\n<li><span title=\" + Code Download Table\">&#9899;<\/span><\/li>\n<li><span title=\" + Code Download Table\">&#9898;<\/span><\/li>\n<\/ol>\n<p>And where (on the blog posting web page) do we add it?  At the first occurrence in the relevant link&#8217;s <i>innerHTML<\/i> (ie. the writing you see for the link) of &#8220;.&#8221; and\/or &#8221; &#8220;.<\/p>\n<p>We&#8217;d already written something quite close to being apt (please read <a target=_blank title='WordPress Is Mentioned By Posting Thread Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-is-mentioned-by-posting-thread-tutorial\/'>WordPress Is Mentioned By Posting Thread Tutorial<\/a> for more here), and so we&#8217;ve based Javascript code on its PHP workings, working that code into a previously written Javascript apt function of code (<i>function changeasfordownload()<\/i>), from <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>.<\/p>\n<p>And so we <b>have<\/b> (where <i><b>var cafd=false;<\/b><\/i> starts scripting and body onload code snippet starts <i>&lt;body onload=&#8221;  <b>changeasfordownload(); cafd=true; <\/b> &#8230;<\/i> &#8230;<\/p>\n<p><code><br \/>\nfunction changeasfordownload() {<br \/>\n  var <b>outs,extis,postprexp,prexp,xp,aorig, <\/b>idmjk=0, newaspare='', big='----------------------GETME', stuffs;<br \/>\n  var admjk = document.getElementsByTagName('a');<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      <b>if (!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=\"http:\/\/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 title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#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 title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n      } else {<\/b><br \/>\n      newaspare = admjk[idmjk].href.replace('_-GETME', '').replace('__GETME', '').replace('_GETME', '').replace(big, '');<br \/>\n      while (big.indexOf('-') != -1) {<br \/>\n        big = big.replace('-', '');<br \/>\n        newaspare = newaspare.replace(big, '');<br \/>\n      }<br \/>\n      big = '----------------------GETME';<br \/>\n      stuffs = newaspare.split('\/');<br \/>\n      admjk[idmjk].download = stuffs[stuffs.length - 1];<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      <b>}<br \/>\n    } else if (admjk[idmjk].href.indexOf('GETME') != -1 && !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=\"http:\/\/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 title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#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 title=\\\" + Code Download Table\\\" onclick=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=500,height=500');\\\"&gt;&amp;#9898;&lt;\/span&gt;\");<br \/>\n    } else if (admjk[idmjk].innerHTML.indexOf('live run') != -1 && !cafd) {<br \/>\n      outs=\"http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts\";<br \/>\n      admjk[idmjk].innerHTML=admjk[idmjk].innerHTML.replace(\" \",\"&lt;span 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=\\\"window.open('\" + outs + \"','_blank','top=100,left=100,width=650,height=100');\\\"&gt;&amp;#9986;&lt;\/span&gt;\");<br \/>\n    <\/b>}<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; for today&#8217;s good ol&#8217; <i>header.php<\/i> changes to our WordPress blog PHP coding.<\/p>\n<p>Respectively, you are taken to Javascript <i>window.open<\/i> popups to &#8230;<\/p>\n<ol>\n<li><a target=_blank title='Cut to the Chase' href='http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts'>http:\/\/www.rjmprogramming.com.au\/slideshow.html#tuts<\/a> &#8230; ie. <i>Cut to the Chase<\/i><\/li>\n<li><a target=_blank title='Code Download Table positioning' href='http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml'>http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml<\/a> (example of Code Download Table positioning to imb_poc.html_GETME)<\/li>\n<li><a target=_blank title='Code Download Table positioning' href='http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml'>http:\/\/www.rjmprogramming.com.au\/getmelist.htm?topoff=150&#038;tsp=342421#imb_poc._GETMEhtml<\/a> (example of Code Download Table positioning to imb_poc.html_GETME)<\/li>\n<\/ol>\n<p> &#8230; but we feel some more changes coming on about this soon.  Must be <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=CBoC12ryaBs'>&#8220;A sly wind from the North&#8221;<\/a> blowing?!<\/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='#d28777' onclick='var dv=document.getElementById(\"d28777\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d28777' 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='#d28803' onclick='var dv=document.getElementById(\"d28803\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d28803' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been coding Javascript in a web application have you ever pondered the string functions &#8230; includes() &#8230; versus &#8230; indexOf() ? To be honest, I haven&#8217;t much, because am always using indexOf(), but to be fair, you might &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-code-download-table-interface-double-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":[151,218,2084,360,385,400,1690,652,861,1666,932,972,997,1238,1319,1456],"class_list":["post-28803","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-blog","tag-code","tag-data-attributes","tag-download","tag-emoji","tag-event","tag-getattribute","tag-javascript","tag-onclick","tag-ondblclick","tag-php","tag-posting","tag-programming","tag-table","tag-tutorial","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28803"}],"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=28803"}],"version-history":[{"count":11,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28803\/revisions"}],"predecessor-version":[{"id":55378,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/28803\/revisions\/55378"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=28803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=28803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=28803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}