{"id":61514,"date":"2023-11-10T03:01:27","date_gmt":"2023-11-09T17:01:27","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=61514"},"modified":"2023-11-13T12:11:43","modified_gmt":"2023-11-13T02:11:43","slug":"emoji-objects-game-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/emoji-objects-game-tutorial\/","title":{"rendered":"Emoji Objects Game Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Emoji Objects Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game_lang.jpg\" title=\"Emoji Objects Game Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Emoji Objects Game Tutorial<\/p><\/div>\n<p>Even though we have been using &#8220;Drag and Drop&#8221; methodologies a lot lately, it was way back in late September 2023, with <a title='Inhouse WordPress Blog Posting Game Tutorial' href='#iwpbpgt'>Inhouse WordPress Blog Posting Game Tutorial<\/a>, when we last needed to change that client HTML and Javascript <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.htm\">Drag and Drop<\/a> clientside basis, that all the PHP parents look to.  But today we need to change it, because we have a new &#8230;<\/p>\n<ul>\n<li>drag and drop methodology based &#8230;<\/li>\n<li>Emoji Objects Game &#8230; involving linking an emoji to a single noun word (representing a &#8220;room&#8221; type) &#8230; or vice versa &#8230; that we think could benefit via &#8230;<\/li>\n<li>allowing a user to pick a non-English language to translate the whole web application into<\/li>\n<\/ul>\n<p> &#8230; as they try our <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game.php_GETME\">&#8220;proof of concept&#8221; emoji_object_game.php<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emoji_object_game.php\">Emoji Object Game<\/a> tapping into <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html------------------------GETME\">that changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html------------------------GETME\">experimental_drag_and_drop.htm<\/a> Drag and Drop basis.<\/p>\n<p>So far only this Emoji Objects Game offers these new Drag and Drop Language interfacing smarts, because we found the Internationalization combination of &#8220;emojis&#8221; and &#8220;single noun word answers&#8221; as an irresistible combination to try this concept out with, and after bedding down this idea, we&#8217;re pretty sure we&#8217;ll improve on that &#8220;single use situation&#8221; over time!<\/p>\n<p>As far as &#8230;<\/p>\n<ul>\n<li>emoji data goes we&#8217;d like to thank <a target=_blank title='Emojipedia' href='https:\/\/emojipedia.org\/objects'>Emojipedia<\/a> for the emoji categorization help &#8230; and &#8230;<\/li>\n<li>as far as language translations go we&#8217;d like to thank <a target=_blank title='Google Translate' href='http:\/\/translate.google.com'>Google Translate<\/a><\/li>\n<\/ul>\n<p> &#8230; profusely!<\/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\/emoji-objects-game-tutorial\/'>Emoji Objects Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='iwpbpgt'>Previous relevant <a target=_blank title='Inhouse WordPress Blog Posting Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/inhouse-wordpress-blog-posting-game-tutorial\/'>Inhouse WordPress Blog Posting Game Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Inhouse WordPress Blog Posting Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.jpg\" title=\"Inhouse WordPress Blog Posting Game Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Inhouse WordPress Blog Posting Game Tutorial<\/p><\/div>\n<p>The WordPress <a target=_blank title='WordPress Blogs tagged 404.php' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/404.php'>404.php<\/a> Tutorial Picture image creation work in yesterday&#8217;s <a title='Interactively Change WordPress Blog Background Image on Scroll Tutorial' href='#icwpbbist'>Interactively Change WordPress Blog Background Image on Scroll Tutorial<\/a> set us to thinking of a Drag and Drop game (akin to those in the <a target=_blank title='Drag tutorials here' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/drag\/'>recent discussions<\/a>) we could set up to &#8230;<\/p>\n<ul>\n<li>show the user, in the &#8220;Drag&#8221; section a WordPress Blog Posting Title (and date) &#8230; which the user should drag to the appropriate &#8230;<\/li>\n<li>table cell, nine of which exist in the &#8220;Drop Zone&#8221;, and are numbered and backgrounded by a random WordPress Tutorial Picture image<\/li>\n<\/ul>\n<p> &#8230; in alignment with the adage &#8230;<\/p>\n<blockquote><p>\nEvery picture is worth a thousand words.\n<\/p><\/blockquote>\n<p>As well, today, both in terms of &#8230;<\/p>\n<ul>\n<li>providing hints &#8230; and\/or &#8230;<\/li>\n<li>providing information<\/li>\n<\/ul>\n<p> &#8230; those table cells are associated with &#8230;<\/p>\n<ul>\n<li>double click event (&#8220;ondblclick&#8221;) logic that shows the &#8220;Cut to the Chase&#8221; underlying &#8220;action item&#8221; associated with the WordPress Blog Posting involved &#8230; and, just quietly &#8230;<\/li>\n<li>right click event (&#8220;oncontextmenu&#8221;) logic that shows the associated WordPress Blog Posting involved itself<\/li>\n<\/ul>\n<p> &#8230; in our <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php_GETME\">first draft &#8220;proof of concept&#8221;<\/a> PHP based <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php\">Inhouse WordPress Blog Posting Game<\/a> (helped out by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html-----------------------GETME\">a tweaked<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.html-----------------------GETME\">experimental_drag_and_drop.htm<\/a> Drag and Drop basis) we hope you get to try below (when it transforms into the Inhouse Blog Game after the default incarnation) &#8230;<\/p>\n<p><iframe id=myihbqiframe onload=\"if (this.src.indexOf('inhouse_blog_game.') == -1) { var aconto = (this.contentWindow || this.contentDocument); if (aconto.document) { aconto = aconto.document; }  aconto.body.style.border='2px dotted olive'; aconto.body.style.cursor='progress'; setTimeout(function() { document.getElementById('myihbqiframe').src='\/\/www.rjmprogramming.com.au\/HTMLCSS\/inhouse_blog_game.php?reload=y'; }, 7000); aconto.getElementById('score').innerHTML+=' ... awaiting Inhouse Blog Game loading ...';    }\" style=\"width:100%;height:900px;\" src=\"\/\/www.rjmprogramming.com.au\/HTMLCSS\/experimental_drag_and_drop.htm\"><\/iframe><\/p>\n<p> &#8230; worked by our WordPress 404.php now containg the PHP code snippet &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n      if (strpos(('' . str_replace(');%20}','',$_SERVER['QUERY_STRING']) . '~'), '437195~') !== false) { \/\/ Drag and drop quiz<br \/>\n          \/\/file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'p.p','here');<br \/>\n          $prevcontis='';<br \/>\n          $ptfileis=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ptitledddata.html';<br \/>\n          if (file_exists($ptfileis)) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/67707029\/how-do-i-get-how-long-the-file-was-created-in-seconds-in-php<br \/>\n            $modifdate = filemtime($ptfileis);<br \/>\n            $secondsago = time() - $modifdate;<br \/>\n            if ($secondsago &lt; 50) {<br \/>\n              unlink($ptfileis);<br \/>\n            } else {<br \/>\n              \/\/$prevcontis=file_get_contents(\"http:\/\/www.rjmprogramming.com.au\/ptitledddata.html\" . \"?random=\" . rand(0,56453423));<br \/>\n              $prevcontis=file_get_contents($ptfileis);<br \/>\n            }<br \/>\n          }<br \/>\n          file_put_contents($ptfileis, $prevcontis . \"\\n\" . $ptitle . '?' . str_replace(');%20}','',$_SERVER['QUERY_STRING']));<br \/>\n          \/\/   file_put_contents($ptfileis, $prevcontis . \"\\n\" . $ptitle . '?random=' . explode(')',$_GET['random'])[0]);<br \/>\n          \/\/file_put_contents($ptfileis . \"huh\", $prevcontis . \"\\n\" . $ptitle . '?' . str_replace(');%20}','',$_SERVER['QUERY_STRING']));<br \/>\n      \/\/} else {<br \/>\n      \/\/    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'p.q',('' . str_replace(');%20}','',$_SERVER['QUERY_STRING']) . '~'));<br \/>\n      }<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; to help out the game.<\/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\/inhouse-wordpress-blog-posting-game-tutorial\/'>Inhouse WordPress Blog Posting Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='icwpbbist'>Previous relevant <a target=_blank title='Interactively Change WordPress Blog Background Image on Scroll Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/interactively-change-wordpress-blog-background-image-on-scroll-tutorial\/'>Interactively Change WordPress Blog Background Image on Scroll Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Interactively Change WordPress Blog Background Image on Scroll Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll_wp.jpg\" title=\"Interactively Change WordPress Blog Background Image on Scroll Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Interactively Change WordPress Blog Background Image on Scroll Tutorial<\/p><\/div>\n<p>With yesterday&#8217;s <a title='Interactively Change Background Image on Scroll User Settings Tutorial' href='#icbisust'>Interactively Change Background Image on Scroll User Settings Tutorial<\/a>&#8216;s offering were you &#8220;an intrepid&#8221;, typing &#8230;<\/p>\n<blockquote><p>\n<a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/600\/400\/\">\/\/www.rjmprogramming.com.au\/ITblog\/600\/400\/<\/a>\n<\/p><\/blockquote>\n<p> &#8230; into that newly minted Javascript prompt window designed for user interaction purposes? This populates the background images in our new Image Scrolling with Fixed Text web application with a random selection from the WordPress Blog you are reading.  Because we have some control here, we researched whether our WordPress <a target=_blank title='WordPress Blogs tagged 404.php' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/404.php'>404.php<\/a> logic could be tweaked to help out more in this scenario.  The way the PHP works here, detecting this situation, at the end of its workings, is to use an image header (exemplified by the GIF one below) &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n            header('Content-Type: image\/gif');<br \/>\n            echo file_get_contents($path);<br \/>\n            exit;<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; where $path would point at a GIF image file residing on the RJM Programming domain web server.   This design restricts us from any <i>echo<\/i> functionality before this, so what can we achieve?  <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA'>Anyone? Anyone?<\/a> Yes, <a target=_blank title='?' href='https:\/\/en.wikipedia.org\/wiki\/Rasmus_Lerdorf'>Rasmus<\/a>, we can write to other web server files that could be like middle-people between the server (supplier of image data) and client (the webpage that called the server).   After the server work &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n      if (strpos(('' . str_replace(');%20}','',$_SERVER['QUERY_STRING']) . '~'), '591734~') !== false) {<br \/>\n          \/\/file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'p.p','here');<br \/>\n          $prevcontis='';<br \/>\n          $ptfileis=$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'ptitledata.html';<br \/>\n          if (file_exists($ptfileis)) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/67707029\/how-do-i-get-how-long-the-file-was-created-in-seconds-in-php<br \/>\n            $modifdate = filemtime($ptfileis);<br \/>\n            $secondsago = time() - $modifdate;<br \/>\n            if ($secondsago &gt; 5) {<br \/>\n              unlink($ptfileis);<br \/>\n            } else {<br \/>\n              $prevcontis=file_get_contents($ptfileis);<br \/>\n            }<br \/>\n          }<br \/>\n          file_put_contents($ptfileis, $prevcontis . \"\\n\" . $ptitle . '?' . str_replace(');%20}','',$_SERVER['QUERY_STRING']));<br \/>\n          \/\/file_put_contents($ptfileis . \"huh\", $prevcontis . \"\\n\" . $ptitle . '?' . str_replace(');%20}','',$_SERVER['QUERY_STRING']));<br \/>\n      \/\/} else {<br \/>\n      \/\/    file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'p.q',('' . str_replace(');%20}','',$_SERVER['QUERY_STRING']) . '~'));<br \/>\n      }<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; back at that client (which called the server with that appended &#8220;591734&#8221; placed onto the URL to indicate the intention to want to examine this return data), we have Ajax based Javascript logic &#8230;<\/p>\n<p><code><br \/>\n  var ptc='#';<br \/>\n  var iptc=0;<br \/>\n  var btlist=[];<br \/>\n  var vsbtlist=[];<br \/>\n  var omo='';<br \/>\n<br \/>\n  var zhr=null;<br \/>\n  var zform=null;<br \/>\n  var rawhtml='';<br \/>\n  <br \/>\n  function defmaybe(inu) {<br \/>\n    var retomo=omo;<br \/>\n    if (omo != '') {<br \/>\n      omo='';<br \/>\n      return retomo;<br \/>\n    }<br \/>\n    return inu;<br \/>\n  }<br \/>\n<br \/>\n  function stateChanged() {<br \/>\n   var inm=1, jnm=1, thebtitle='';<br \/>\n   if (zhr.readyState == 4) {<br \/>\n   if (zhr.status == 200) {<br \/>\n   rawhtml = zhr.response;<br \/>\n   console.log('rawhtml=' + rawhtml);<br \/>\n   if (rawhtml.indexOf('random=') != -1 && vsbtlist.length &gt; 0) {<br \/>\n     var rawrs=rawhtml.split('random=');<br \/>\n     for (inm=1; inm&lt;rawrs.length; inm++) {<br \/>\n      for (jnm=0; jnm&lt;vsbtlist.length; jnm++) {<br \/>\n        if (vsbtlist[jnm].indexOf('?random=' + rawrs[inm].split(String.fromCharCode(10))[0]) != -1) {<br \/>\n          console.log('found ...');<br \/>\n          thebtitle=rawhtml.split('?random=' + rawrs[inm].split(String.fromCharCode(10))[0])[0].split(String.fromCharCode(10))[eval(-1 + rawhtml.split('?random=' + rawrs[inm].split(String.fromCharCode(10))[0])[0].split(String.fromCharCode(10)).length)];<br \/>\n          console.log(thebtitle);<br \/>\n          document.getElementById(vsbtlist[jnm].split('?')[0]).title=thebtitle + ' ... you can right click to navigate there';<br \/>\n          document.getElementById(vsbtlist[jnm].split('?')[0]).onmouseout=function(){ omo=''; };<br \/>\n          document.getElementById(vsbtlist[jnm].split('?')[0]).onmouseover=function(){ omo='\/\/www.rjmprogramming.com.au\/ITblog\/' + thebtitle.split(' (')[0].toLowerCase().replace(\/\\ \/g,'-'); };<br \/>\n          document.getElementById(vsbtlist[jnm].split('?')[0]).oncontextmenu=function(){ window.open(defmaybe('\/\/www.rjmprogramming.com.au\/ITblog\/' + thebtitle.split(' (')[0].toLowerCase().replace(\/\\ \/g,'-')),'_blank','top=50,left=50,width=800,height=800'); };<br \/>\n        }<br \/>\n      }<br \/>\n     }<br \/>\n   }<br \/>\n   }<br \/>\n   }<br \/>\n  }<br \/>\n<br \/>\n  function ajaxit() {<br \/>\n   zhr = new XMLHttpRequest();<br \/>\n   zhr.onreadystatechange=stateChanged;<br \/>\n   zhr.open('get', '\/\/www.rjmprogramming.com.au\/ptitledata.html?random=' + Math.floor(Math.random() * 196756453), true);<br \/>\n   zhr.send(null);<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; adding <i>oncontextmenu<\/i> (ie. right click) functionality to the background images, so as a popup window can open to show the associated WordPress Blog posting linked to the image data.<\/p>\n<p> &#8230; in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html--GETME\">today&#8217;s changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html--GETME\">interactively_change_background_image_on_scroll.html<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\">web application<\/a> you can <a href='#myicbios'>also try way below<\/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\/interactively-change-wordpress-blog-background-image-on-scroll-tutorial\/'>Interactively Change WordPress Blog Background Image on Scroll Tutorial<\/a>.<\/p-->\n<hr>\n<p id='icbisust'>Previous relevant <a target=_blank title='Interactively Change Background Image on Scroll User Settings Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/interactively-change-background-image-on-scroll-user-settings-tutorial\/'>Interactively Change Background Image on Scroll User Settings Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Interactively Change Background Image on Scroll User Settings Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll_more.jpg\" title=\"Interactively Change Background Image on Scroll User Settings Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Interactively Change Background Image on Scroll User Settings Tutorial<\/p><\/div>\n<p>If you are a regular reader, you&#8217;ll know with the web applications presented here, we usually try to allow the user to control &#8230;<\/p>\n<ul>\n<li>how they function &#8230; and\/or sometimes &#8230;<\/li>\n<li>how they look<\/li>\n<\/ul>\n<p> &#8230; in the ephemeral &#8220;this session&#8221; sense, and sometimes follow that up, depending, with recallable settings often calling on window.localStorage or HTTP Cookies, associated with the web browser being used.<\/p>\n<p>Regarding that <i>ephemeral &#8220;this session&#8221; sense<\/i> above, building on the work of yesterday&#8217;s <a title='Interactively Change Background Image on Scroll Tutorial' href='#icbist'>Interactively Change Background Image on Scroll Tutorial<\/a>, we now allow the user control over defining any\/all &#8230;<\/p>\n<ul>\n<li>Background Image source URL<\/li>\n<li>Refresh delay (in seconds)<\/li>\n<li>Text Wording<\/li>\n<li>Text Background Image source URL<\/li>\n<\/ul>\n<p> &#8230; and regarding the use of that last one, we&#8217;ve decided, somewhat, to take over with the CSS regarding the Text Wording showing through amongst so many &#8220;image interests&#8221; with various opacities &#8230;<\/p>\n<p><code><br \/>\n  var mode='dw';<br \/>\n  <br \/>\n  function preask() {<br \/>\n   if (backimg.trim() != '') {<br \/>\n    if (backimg.toLowerCase().replace(\/\\ \/g,'') == 'lorempicsum') {<br \/>\n       backimg='\/\/picsum.photos\/600\/400' + suffix + '?random=' + Math.floor(Math.random() * 198765643);<br \/>\n       if (mode == 'dw') {<br \/>\n       mode='';<br \/>\n       document.write('&lt;style&gt; .bg-text { background: linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(\"' + backimg + '\"); background-size: contain; background-repeat: repeat;  text-shadow:-2px 2px 2px #ff2d95; opacity: 0.9;  } &lt;\/style&gt;');<br \/>\n       } else {<br \/>\n       document.getElementById('dstyle').innerHTML+='&lt;style&gt; .bg-text { background: linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(\"' + backimg + '\"); background-size: contain; background-repeat: repeat;  text-shadow:-2px 2px 2px #ff2d95; opacity: 0.9;  } &lt;\/style&gt;';<br \/>\n       }<br \/>\n       backimg='lorempicsum';<br \/>\n    } else {<br \/>\n       if (mode == 'dw') {<br \/>\n       mode='';<br \/>\n       document.write('&lt;style&gt; .bg-text { background: linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(\"' + backimg + '\"); background-size: contain; background-repeat: repeat;  text-shadow:-2px 2px 2px #ff2d95; opacity: 0.9;  } &lt;\/style&gt;');<br \/>\n       } else {<br \/>\n       document.getElementById('dstyle').innerHTML+='&lt;style&gt; .bg-text { background: linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(\"' + backimg + '\"); background-size: contain; background-repeat: repeat;  text-shadow:-2px 2px 2px #ff2d95; opacity: 0.9;  } &lt;\/style&gt;';<br \/>\n       }<br \/>\n    }<br \/>\n   }<br \/>\n  }<br \/>\n<\/code><\/p>\n<p>Which beggars the observation &#8230;<\/p>\n<blockquote><p>\nIsn&#8217;t the CSS <a target=_blank title='CSS text-shadow information from W3schools' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_text-shadow.php'>text-shadow<\/a> property just great?!\n<\/p><\/blockquote>\n<p>We use it more and more often to help out foreground text presented with a lot of &#8220;overlay imagery&#8221; going on behind it.<\/p>\n<p>Here is the Javascript prompt window &#8220;blurb&#8221; presented to the user should they want to delve into this woooooorrrrrlllllldddd just by clicking or touching in the non-text part of the webpage &#8230;<\/p>\n<blockquote><p>\n      <font size=1>var ansis=prompt(&#8216;<\/font>Optionally enter in background source URL prefix [&#8216; + prefix + midbit + suffix + &#8216;] ( or type Lorem Picsum or for blog posting images you could try \/\/www.rjmprogramming.com.au\/ITblog\/&#8217; + sixhundred + &#8216;\/&#8217; + fourhundred + &#8216;\/ ), hashtag delimited from an optional imagery refresh rate in seconds [&#8216; + ten + &#8216;], hashtag delimited from an optional Text element background image (or type Lorem Picsum), hashtag delimited from optional Text wording [&#8216; + tcont + &#8216;] we will assume involves a space.<font size=1>&#8216;, &#8221;);<\/font>\n<\/p><\/blockquote>\n<p> &#8230; in <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html-GETME\">the changed<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html-GETME\">interactively_change_background_image_on_scroll.html<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\">web application<\/a> you can <a href='#myicbios'>also try below<\/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\/interactively-change-background-image-on-scroll-user-settings-tutorial\/'>Interactively Change Background Image on Scroll User Settings Tutorial<\/a>.<\/p-->\n<hr>\n<p id='icbist'>Previous relevant <a target=_blank title='Interactively Change Background Image on Scroll Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/interactively-change-background-image-on-scroll-tutorial\/'>Interactively Change Background Image on Scroll Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Interactively Change Background Image on Scroll Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.gif\" title=\"Interactively Change Background Image on Scroll Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Interactively Change Background Image on Scroll Tutorial<\/p><\/div>\n<p>Regarding today&#8217;s &#8220;Interactively Change Background Image on Scroll&#8221; topic, we&#8217;d like to thank, profusely, two sources &#8230;<\/p>\n<ul>\n<li>Ideas and Initial Code &#8230; <a target=_blank href='https:\/\/www.w3schools.com\/'>W3School<\/a>&#8216;s <a target=_blank href='https:\/\/www.w3schools.com\/howto\/howto_css_bg_change_scroll.asp' title='How TO - Change Background on Scroll'>How TO &#8211; Change Background on Scroll<\/a><\/li>\n<li>Background Image Content &#8230; <a target=_blank href='https:\/\/picsum.photos\/'>Lorem Picsum<\/a><\/li>\n<\/ul>\n<p>Queue &#8230; <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=yTapoA5RQyo'>Lulu<\/a> <font size=1>(no, not <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/Android\/NalaLuna.jpg'>the dog<\/a>, this time)<\/font>!<\/p>\n<p>Yes, we&#8217;ve just added &#8220;Interactively&#8221;, we hear you say <font size=1>(just maybe, perhaps, a tad sarcastically, shall we say &#8230; huh?!!!!)<\/font>.  But, it&#8217;s the &#8230;<\/p>\n<ul>\n<li><i><a target=_blank title='Global contenteditable attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_global_contenteditable.asp'>contenteditable=true<\/a><\/i> HTML div <font size=1>(not new by itself &#8230; but combined with)<\/font> &#8230;<\/li>\n<li>text length calculator logic (using an HTML canvas element&#8217;s <a target=_blank title='Canvas measureText information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/canvas_measuretext.asp'>measureText<\/a> functionality), thanks to <a target=_blank href='https:\/\/stackoverflow.com\/questions\/31305071\/measuring-text-width-height-without-rendering' title='https:\/\/stackoverflow.com\/questions\/31305071\/measuring-text-width-height-without-rendering'>https:\/\/stackoverflow.com\/questions\/31305071\/measuring-text-width-height-without-rendering<\/a> &#8230; calling on &#8230;<\/li>\n<li><a target=_blank title='HTML onkeydown event information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/event_onkeydown.asp'><i>onkeydown<\/i><\/a> logic &#8230; to be a bit savvy regarding the text element width (along with use of <a target=_blank title='Javascropt DOM innerText information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/prop_node_innertext.asp'>innerText<\/a> and the <a target=_blank title='HTML onblur event information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/event_onblur.asp'><i>onblur<\/i><\/a> event logic backup)<\/li>\n<\/ul>\n<p> &#8230; that is all a bit new, at least to us, today, continuing on the recent wonder regarding <i>contenteditable=true<\/i>, mentioned in the recent <a target=_blank title='Animated GIF SVG Quiz Automation Interaction Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-svg-quiz-automation-interaction-tutorial\/'>Animated GIF SVG Quiz Automation Interaction Tutorial<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/www.rjmprogramming.com.au\/ITblog\/animated-gif-svg-quiz-automation-interaction-tutorial\/'><p>\nAnd did you know, at least for non-mobile platforms, you can set the focus (on non-mobile platforms only, as there are the \u201ckeyboard getting in the way\u201d issues we\u2019re thankful for with mobile platforms which preclude any thoughts of a programmed [element].focus() operation) to one of these \u201ccontenteditable=true style elements\u201d? We\u2019d never been sure, only focussing to HTML input textboxes and textareas up to now, we believe.\n<\/p><\/blockquote>\n<p> &#8230; whereby non-mobile focus to a contenteditable=true HTML div type (innerHTML style) element is possible, adding to the original W3School&#8217;s content ideas swirling around &#8230;<\/p>\n<ul>\n<li>CSS position: fixed; &#8230; for foreground text, in relation to &#8230;<\/li>\n<li>scrolling &#8230; with &#8230;<\/li>\n<li>background image<sub>ry<\/sub><\/li>\n<\/ul>\n<p> &#8230; for topics we hope you find as interesting as we did, in our new <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html_GETME\">&#8220;proof of concept&#8221;<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\">web application<\/a> you can also try below &#8230;<\/p>\n<p><iframe id=myicbios style=\"width:100%;height:900px;\" src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/interactively_change_background_image_on_scroll.html\"><\/iframe> <\/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='#d60859' onclick='var dv=document.getElementById(\"d60859\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/fixed\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60859' 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='#d60876' onclick='var dv=document.getElementById(\"d60876\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/text-shadow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60876' 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='#d60879' onclick='var dv=document.getElementById(\"d60879\"); 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='d60879' 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='#d60886' onclick='var dv=document.getElementById(\"d60886\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/drag\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60886' 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='#d61514' onclick='var dv=document.getElementById(\"d61514\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/language\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d61514' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Even though we have been using &#8220;Drag and Drop&#8221; methodologies a lot lately, it was way back in late September 2023, with Inhouse WordPress Blog Posting Game Tutorial, when we last needed to change that client HTML and Javascript Drag &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/emoji-objects-game-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,15,37],"tags":[2525,2237,364,4385,385,3023,476,532,576,620,652,1560,2011,2411,932,997,1238,1300,1301,1319,1345,1452],"class_list":["post-61514","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-child","tag-drag","tag-drag-and-drop","tag-drop","tag-emoji","tag-emojipedia","tag-game","tag-google-translate","tag-html","tag-internationalization","tag-javascript","tag-language","tag-noun","tag-parent","tag-php","tag-programming","tag-table","tag-translate","tag-translation","tag-tutorial","tag-url","tag-word"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/61514"}],"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=61514"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/61514\/revisions"}],"predecessor-version":[{"id":61630,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/61514\/revisions\/61630"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=61514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=61514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=61514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}