{"id":52151,"date":"2021-04-18T03:01:13","date_gmt":"2021-04-17T17:01:13","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=52151"},"modified":"2021-04-17T20:14:57","modified_gmt":"2021-04-17T10:14:57","slug":"just-javascript-five-hundred-card-game-follow-suit-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-follow-suit-tutorial\/","title":{"rendered":"Just Javascript Five Hundred Card Game Follow Suit Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game Follow Suit Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_followsuit.jpg\" title=\"Just Javascript Five Hundred Card Game Follow Suit Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game Follow Suit Tutorial<\/p><\/div>\n<p>For today&#8217;s work progressing yesterday&#8217;s <a title='Just Javascript Five Hundred Card Game Host Aesthetics Tutorial' href='#jjfhcghat'>Just Javascript Five Hundred Card Game Host Aesthetics Tutorial<\/a> we had as an email to oneself &#8230;<\/p>\n<blockquote><p>\nFwd: Click away wider, documenttitle global variable, Know when 500 game ends, and add hybrid 500 card game in document.title\n<\/p><\/blockquote>\n<p> &#8230; the incidentals for today on top of the planned &#8220;enforcing follow suit&#8221; work from a few days ago.<\/p>\n<p>Writing &#8220;chores&#8221; down ahead of a day is, of course, highly recommended, as the brain can mull over it with sleep.   Not always possible, of course, but good.<\/p>\n<p>The &#8220;documenttitle global variable&#8221; may amuse or look kludgy to you, but we like the idea of fundamental DOM members such as &#8230;<\/p>\n<ul>\n<li>document.URL<\/li>\n<li>document.title<\/li>\n<li>location.href<\/li>\n<\/ul>\n<p> &#8230; that deserve coding for more than one incarnation &#8220;meaning&#8221; (perhaps only discovered as a project matures) can be accommodated well (via &#8220;function documenttitleeq&#8221; below) working the logic using Javascript global variables as per &#8230;<\/p>\n<ol>\n<li>we went around globally substituting any &#8220;document.title=[blah];&#8221; code with &#8220;documenttitleeq([blah];&#8221; code then globally substituted any remaining &#8220;document.title&#8221; with &#8220;documenttitle&#8221; then fixed up any &#8220;documenttitleeq([blah];&#8221; code with &#8220;documenttitleeq([blah]);&#8221; code &#8230; then &#8230;<\/li>\n<li>\n<code><br \/>\n  var documenttitle=document.title;   \/\/ up the top as the global variable initialization<br \/>\n<br \/>\n  function documenttitleeq(indt) {<br \/>\n   documenttitle=indt;<br \/>\n   if (card_game == '500ish') {<br \/>\n   document.title='500 (hybrid) card game ... ' + scoresuffix;<br \/>\n   if (eval('' + nominal_numplayers + ' * (' + scoresuffix.replace(\/\\,\/g, ' + ') + ')')  >= Math.abs(eval('' + totcpp))) {<br \/>\n     if (eval('' + totcpp) &gt; 0) {<br \/>\n     totcpp=-totcpp;<br \/>\n     if (confirm('Thanks for playing the 500 (hybrid) card game ... ' + scoresuffix + ' ... OK to play again?')) {<br \/>\n       location.href=document.URL;<br \/>\n     }<br \/>\n     }<br \/>\n   }<br \/>\n   } else {<br \/>\n   document.title=documenttitle;<br \/>\n   }<br \/>\n  }<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p>As you see, this helps us with this (hybrid) &#8220;500 card game&#8221; that somebody not in the game going to look at the host or dealer Player 1&#8217;s webpage now has a mechanism to discover what they are playing without having to interfere with that game (designed as a &#8220;Just Javascript&#8221; (ie. &#8220;No Body Definition&#8221;) project).<\/p>\n<p>Regarding the enforcement of &#8220;following of suit&#8221;, sure, it&#8217;s an important part of a real game of 500 where four players play and they are in teams of two, but we&#8217;re not doing that, yet, with our hybrid 500 card game, and so allow this &#8220;hybrid&#8221; at least have some variety on this front, <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n  var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(\/\\_\/g,' ').trim().substring(0,1).toUpperCase() + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(\/\\_\/g,' ').trim().substring(1).toLowerCase() + ' card game (if Zebra (ie. Memories with cross colour match limitation) prefix answer by + and if Any Colour (ie. Memories with a same colour lack of limitation) prefix answer by -) and suffix by .0 for hybrid 500 card game (optionally comma delimited by a list of email\/SMS addresses\/numbers, else we can show you cards via \"turn away\" popup windows<font color=blue>, and if you want players not to have to follow suit involve a space character somewhere<\/font>)?', '2') : null;<br \/>\n<\/code><\/p>\n<p>Again, to see these nuances in action try hosting a (hybrid) &#8220;500 card game&#8221; of your own with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-----------------GETME\" title=\"cards_usefocus.html\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-----------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  Try adding &#8220;.0&#8221; to number of card players to play (our hybrid) &#8220;500&#8221; card game, and optionally wait or immediately append a comma separated email\/SMS address\/number list for your &#8220;500 card game&#8221; players (who can affect the game remotely via email)!<\/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\/just-javascript-five-hundred-card-game-follow-suit-tutorial\/'>Just Javascript Five Hundred Card Game Follow Suit Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjfhcghat'>Previous relevant <a target=_blank title='Just Javascript Five Hundred Card Game Host Aesthetics Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-host-aesthetics-tutorial\/'>Just Javascript Five Hundred Card Game Host Aesthetics Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game Host Aesthetics Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_aesthetics.jpg\" title=\"Just Javascript Five Hundred Card Game Host Aesthetics Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game Host Aesthetics Tutorial<\/p><\/div>\n<p>On top of the progress of yesterday&#8217;s <a title='Just Javascript Five Hundred Card Game Email Buttons Tutorial' href='#jjfhcgebt'>Just Javascript Five Hundred Card Game Email Buttons Tutorial<\/a>, today, we&#8217;ve been trying to improve &#8230;<\/p>\n<ul>\n<li>aesthetics of the host (hybrid) &#8220;500 card game&#8221; &#8230; and in so doing &#8230;<\/li>\n<li>improve the &#8220;user experience&#8221; playing that &#8220;500 card game&#8221;<\/li>\n<\/ul>\n<p>We worked on the SVG content to the background images so as to make the cards be &#8230;<\/li>\n<ul>\n<li>more legible (via increased size and appropriate repositioning and change to Verdana font family)<\/li>\n<li>colour coded &#8230; hearts and diamonds red (via &#8220;stroke:red;&#8221;) and clubs and spades black (via &#8220;fill:black;&#8221;)<\/li>\n<\/ul>\n<p>To see this in action try hosting a (hybrid) &#8220;500 card game&#8221; of your own with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----------------GETME\" title=\"cards_usefocus.html\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  Try adding &#8220;.0&#8221; to number of card players to play (our hybrid) &#8220;500&#8221; card game, and optionally wait or immediately append a comma separated email\/SMS address\/number list for your &#8220;500 card game&#8221; players (who can affect the game remotely via email)!<\/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\/just-javascript-five-hundred-card-game-host-aesthetics-tutorial\/'>Just Javascript Five Hundred Card Game Host Aesthetics Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjfhcgebt'>Previous relevant <a target=_blank title='Just Javascript Five Hundred Card Game Email Buttons Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-email-buttons-tutorial\/'>Just Javascript Five Hundred Card Game Email Buttons Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game Email Buttons Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_email_buttons.jpg\" title=\"Just Javascript Five Hundred Card Game Email Buttons Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game Email Buttons Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Just Javascript Five Hundred Card Game By Correspondence Tutorial' href='#jjfhcgbct'>Just Javascript Five Hundred Card Game By Correspondence Tutorial<\/a> &#8220;500 card game&#8221; communication options felt &#8230;<\/p>\n<ul>\n<li>more like &#8220;sharing&#8221; &#8230; and only mildly &#8230;<\/li>\n<li>anything like &#8220;collaboration&#8221;<\/li>\n<\/ul>\n<p> &#8230; and we think that by allowing (<a target=_blank title='Input type=submit button information from w3schools' href='https:\/\/www.w3schools.com\/tags\/att_input_type_submit.asp'>submit<\/a>) button presses with the &#8220;email via PHP mail&#8221; conduit to affect the &#8220;500 card game&#8221; display seen by the dealer and hoster (ie. Player 1) is more your &#8220;collaboration&#8221; integration, wouldn&#8217;t you say?<\/p>\n<p>Well, it&#8217;s possible in two senses &#8230;<\/p>\n<ul>\n<li>inline HTML email allows form<font size=1>s<\/font> with multiple &#8220;submit&#8221; buttons allowed &#8230; as well as &#8230;<\/li>\n<li>PHP helper integration to control the existence or not of some web server file(s) &#8230; as our research into postMessage ideas got us to realize its brilliance is not enough for what we are after<\/li>\n<\/ul>\n<p>Still &#8220;Just Javascript&#8221; (ie. &#8220;No Body Defined&#8221;) back at the parent (here with all this), though it constructs emails that can contain a body element in order to navigate via an inline HTML form to &#8220;be a player&#8221; remotely.<\/p>\n<p>Behind the scenes our new PHP <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.php_GETME\" title=\"cards_usefocus.php\">cards_usefocus.php<\/a> helps out <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------------GETME\" title=\"cards_usefocus.html\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  Try adding &#8220;.0&#8221; to number of card players to play (our hybrid) &#8220;500&#8221; card game, and optionally wait or immediately append a comma separated email\/SMS address\/number list for your &#8220;500 card game&#8221; players (who can affect the game remotely via email)!<\/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\/just-javascript-five-hundred-card-game-email-b-tutorial\/'>Just Javascript Five Hundred Card Game Email Buttons Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjfhcgbct'>Previous relevant <a target=_blank title='Just Javascript Five Hundred Card Game By Correspondence Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-by-correspondence-tutorial\/'>Just Javascript Five Hundred Card Game By Correspondence Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game By Correspondence Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_email.jpg\" title=\"Just Javascript Five Hundred Card Game By Correspondence Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game By Correspondence Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Just Javascript Five Hundred Card Game Joker Tutorial' href='#jjfhcgjt'>Just Javascript Five Hundred Card Game Joker Tutorial<\/a> left us with the &#8220;to-do list&#8221; &#8230;<\/p>\n<ul>\n<li>enforce the following of suits<\/li>\n<li>aesthetics<\/li>\n<li>&#8220;user experience&#8221;<\/li>\n<li>sharing<\/li>\n<\/ul>\n<p> &#8230; and today, we&#8217;ve jumped straight to &#8220;sharing&#8221; for a few reasons &#8230;<\/p>\n<ul>\n<li>collaboration and sharing &#8230; yes &#8230; but also &#8230;<\/li>\n<li>allow &#8220;500 card game&#8221; players to not be huddled around the one computer &#8230; and &#8230;<\/li>\n<li>on that one computer used, (now) have a (better) mechanism for player cards be hidden (easier) from the other players in the game, our hybrid being &#8220;every player for their own&#8221;<\/li>\n<\/ul>\n<p> &#8230; allowing for three modes of communication &#8230;<\/p>\n<ul>\n<li>email via PHP mail &#8230; our preferred method, because we can do this in the background via our favourite &#8220;midair&#8221; email communication conduit, <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a>\/<a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> &#8230;<br \/>\n<code><br \/>\n  var xhr=null;<br \/>\n  var form=null;<br \/>\n<br \/>\n  function inhouse(inhref) {<br \/>\n    var ine=inhref.split('mailto:')[1].split('?')[0];<br \/>\n    if (ine.toLowerCase() == ine) {<br \/>\n         form = new FormData();<br \/>\n         xhr = new XMLHttpRequest();<br \/>\n         form.append('to', ine);<br \/>\n         form.append('inline', 'y');<br \/>\n         form.append('subject', decodeURIComponent(inhref.split('subject=')[1].split('&')[0].split('#')[0]));<br \/>\n         form.append('body', '&lt;html&gt;&lt;body&gt;&lt;p style=font-size:36px;&gt;' + decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]) + '&lt;\/p&gt;&lt;\/body&gt;&lt;\/html&gt;');<br \/>\n         \/\/alert(decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]));<br \/>\n         xhr.open('post', '\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php', true);<br \/>\n         xhr.send(form);<br \/>\n<br \/>\n         return '';<br \/>\n    }<br \/>\n    return inhref;<br \/>\n  }<br \/>\n<\/code>\n<\/li>\n<li>email via &#8220;mailto:&#8221; &#8220;a&#8221; link (we do not advertise, but a mixed case email address will use this technique)<\/li>\n<li>SMS via &#8220;sms:&#8221; &#8220;a&#8221; link<\/li>\n<\/ul>\n<p> &#8230; still all &#8220;Just Javascript&#8221; (ie. &#8220;No Body Definition&#8221;) in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------------GETME\" title=\"cards_usefocus.html\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  Try adding &#8220;.0&#8221; to number of card players to play (our hybrid) &#8220;500&#8221; card game, and optionally wait or immediately append a comma separated email\/SMS address\/number list for your &#8220;500 card game&#8221; players!<\/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\/just-javascript-five-hundred-card-game-by-correspondence-tutorial\/'>Just Javascript Five Hundred Card Game By Correspondence Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjfhcgjt'>Previous relevant <a target=_blank title='Just Javascript Five Hundred Card Game Joker Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-joker-tutorial\/'>Just Javascript Five Hundred Card Game Joker Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game Joker Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_fivehundred_two.jpg\" title=\"Just Javascript Five Hundred Card Game Joker Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game Joker Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s lack of a Joker in the &#8220;500&#8221; card game established yesterday with <a title='Just Javascript Five Hundred Card Game Tutorial' href='#jjfhcgt'>Just Javascript Five Hundred Card Game Tutorial<\/a> has been remedied.<\/p>\n<p>And we forgot the logic that allows a lead up player to still win (that trick) with a paltry non-trump card if the other users also play cards that are not trumps nor a larger card of that same leading suit, nor the Joker.<\/p>\n<p>There&#8217;s still a bit more logic to go about the play (ie. enforce the following of suits), then aesthetics and then &#8220;user experience&#8221; and finally sharing, perhaps.<\/p>\n<p>But see how you go with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--------------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  Try adding &#8220;.0&#8221; to number of card players to play (our hybrid) &#8220;500&#8221; card 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\/just-javascript-five-hundred-card-game-joker-tutorial\/'>Just Javascript Five Hundred Card Game Joker Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjfhcgt'>Previous relevant <a target=_blank title='Just Javascript Five Hundred Card Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-tutorial\/'>Just Javascript Five Hundred Card Game Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Five Hundred Card Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_fivehundred.jpg\" title=\"Just Javascript Five Hundred Card Game Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Five Hundred Card Game Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Just Javascript Memories SVG Emoji CSS Animation Tutorial' href='#jjmsvgecssat'>Just Javascript Memories SVG Emoji CSS Animation Tutorial<\/a>, today, we add on &#8230;<\/p>\n<ul>\n<li>a pared down version of the card game &#8220;500&#8221; &#8230; featuring &#8230;<\/li>\n<li>no bidding &#8230;<\/li>\n<li>no Jokers (yet) &#8230;<\/li>\n<li>left and right bowers (Jack trumps, Jack other same colour) as the top two cards &#8230;<\/li>\n<li>for 2 to 25 players &#8230;<\/li>\n<li>Player 1 leads off first<\/li>\n<\/ul>\n<p> &#8230; the cards dealt out in turn to users and the next card turned over to determine trumps.<\/p>\n<p>It&#8217;s early days for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-------------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).  As such, we anticipate improvements to this first venture into card games that &#8220;turn on the winning of tricks&#8221;.<\/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\/just-javascript-five-hundred-card-game-tutorial\/'>Just Javascript Five Hundred Card Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjmsvgecssat'>Previous relevant <a target=_blank title='Just Javascript Memories SVG Emoji CSS Animation Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-memories-svg-emoji-css-animation-tutorial\/'>Just Javascript Memories SVG Emoji CSS Animation Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Memories SVG Emoji CSS Animation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_animation.jpg\" title=\"Just Javascript Memories SVG Emoji CSS Animation Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Memories SVG Emoji CSS Animation Tutorial<\/p><\/div>\n<p>There are lots of styles of animation that do not suit a &#8220;Just Javascript&#8221; (ie. &#8220;No Body Definition&#8221;) style of web application as for <a title='Just Javascript Memories SVG Emoji Background Tutorial' href='#jjmsvgebt'>Just Javascript Memories SVG Emoji Background Tutorial<\/a>&#8216;s work, but there is one left that can really help add some excitement and colour to the whole project, that being the use of CSS <a target=_blank title='CSS3 @keyframes rule information' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes<\/a> Animation techniques.<\/p>\n<p>You&#8217;d be amazed how widespread it is regarding the CSS property animation availability we found at <a target=_blank title='Useful link, thanks' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_animated_properties'>Animatable CSS properties<\/a>, thanks, from colour through aesthetics to positioning and sizing of webpage content.<\/p>\n<p>We decided the way we&#8217;d apply some animation was to, between the first and second selection of cards in the Memories game, for any user, we&#8217;d add a bit of tension by some mild animated movement applied to the multiple background images.  Yes, animations can happen for multiple background images, even variable amounts of change for each single background image part, if you like, but we applied the same movement to every part of the background image components.<\/p>\n<p>We also animated some aesthetics via some CSS <a target=_blank title='CSS filter property information from w3schools' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_filter.asp'>filter<\/a> application, as per &#8230;<\/p>\n<p><code><br \/>\n    if (nominal_numplayers) {<br \/>\n      defstyle=defstyle.replace('} &lt;\/style&gt;', ' animation: animatedBackground 10s linear infinite; } @keyframes animatedBackground { from { filter: contrast(175%) brightness(120%) saturate(70%); } to { filter: contrast(95%) brightness(90%) saturate(150%); } } &lt;\/style&gt;');<br \/>\n    }<br \/>\n<\/code><\/p>\n<p> &#8230; that can be built upon by a possible second layer of animation (and plain straight background colour randomness) via the <i>document.head.innerHTML+=bpmore(defstyle);<\/i> use of &#8230;<\/p>\n<p><code><br \/>\n  function bpmore(incss) {<br \/>\n     var cgcols=['lime','maroon','lightblue','purple','navy','teal','fuchsia','olive','red','lightgreen','darkorange','pink','orange','yellow'];<br \/>\n     var icg=eval(0 + Math.floor(Math.random() * cgcols.length));<br \/>\n     var mvt=eval(10 + Math.floor(Math.random() * 40));<br \/>\n     var kf=\" @keyframes animatedBpos { from { background-position: bp1; } to { background-position: bp2; } } \";<br \/>\n     var inkf=\"\", jnkf=\"\", jnkfd=\"\", nn=0;<br \/>\n     var inks=[];<br \/>\n     if (incss.indexOf('} &lt;\/style&gt;') != -1) {<br \/>\n     if (incss.indexOf('background-position:') != -1) {<br \/>\n       inkf=incss.split('background-position:')[1].split(';')[0].trim();<br \/>\n       inks=inkf.split(',');<br \/>\n       for (nn=0; nn&lt;inks.length; nn++) {<br \/>\n         if (('' + inks[nn]).indexOf(' ') != -1) {<br \/>\n         if (('' + inks[nn]).indexOf('px') != -1) {<br \/>\n         jnkf+=jnkfd + eval(mvt + eval('' + inks[nn].replace(\/px\/g,'').replace(\/\\%\/g,'').split(' ')[0])) + 'px ' + eval(30 + eval('' + inks[nn].replace(\/px\/g,'').replace(\/\\%\/g,'').split(' ')[1])) + 'px';<br \/>\n         } else {<br \/>\n         jnkf+=jnkfd + eval(mvt + eval('' + inks[nn].replace(\/px\/g,'').replace(\/\\%\/g,'').split(' ')[0])) + '% ' + eval(30 + eval('' + inks[nn].replace(\/px\/g,'').replace(\/\\%\/g,'').split(' ')[1])) + '%';<br \/>\n         }<br \/>\n         } else {<br \/>\n         jnkf+=jnkfd + inks[nn];<br \/>\n         }<br \/>\n         jnkfd=',';<br \/>\n       }<br \/>\n       if (incss.indexOf('} @keyframes ') != -1) {<br \/>\n         return incss.replace('yellow',cgcols[icg]).replace('} @keyframes ', ' animation: animatedBpos 10s linear infinite; }' + kf.replace('bp1', inkf).replace('bp2', jnkf) + ' @keyframes ');<br \/>\n       } else {<br \/>\n         return incss.replace('yellow',cgcols[icg]).replace('} &lt;\/style&gt;', ' animation: animatedBpos 10s linear infinite; }' + kf.replace('bp1', inkf).replace('bp2', jnkf) + ' } &lt;\/style&gt;');<br \/>\n       }<br \/>\n     }<br \/>\n     }<br \/>\n     return incss;<br \/>\n  }<br \/>\n<\/code><\/p>\n<p>For more colour and pizazz try this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html------------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html------------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).<\/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\/just-javascript-memories-svg-emoji-css-animation-tutorial\/'>Just Javascript Memories SVG Emoji CSS Animation Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjmsvgebt'>Previous relevant <a target=_blank title='Just Javascript Memories SVG Emoji Background Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-memories-svg-emoji-background-tutorial\/'>Just Javascript Memories SVG Emoji Background Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Memories SVG Emoji Background Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_memories_mobile.jpg\" title=\"Just Javascript Memories SVG Emoji Background Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Memories SVG Emoji Background Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Just Javascript Memories SVG Emoji Cursor Tutorial' href='#jjmsvgect'>Just Javascript Memories SVG Emoji Cursor Tutorial<\/a> had good and bad news related to SVG Emoji Cursors?<\/p>\n<ul>\n<li>the bad news is that this CSS cursor concept does not work on mobile platforms for similar reasons to why onmouseover does not work &#8230; to hover over the mobile device screen means nothing to event logic &#8230; while &#8230;<\/li>\n<li>the good news is that the same type of data-uri of SVG content can work for a (mobile CSS) background image as it can work for (non-mobile CSS) cursor<\/li>\n<\/ul>\n<p> &#8230; and so we can show, ahead of time, via a background image, news about the Memories game on mobile platforms (that are missing that CSS cursor methodology of showing similar information) &#8230; <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n    <font color=blue>var dhi='';<br \/>\n    if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n    covercover=',80px 60px,80px 60px';<br \/>\n    prevsb=String.fromCodePoint(10067,10068) + csuff;<br \/>\n    dhi='&lt;style&gt; html { cursor: url(\"data:image\/svg+xml;utf8,&lt;svg xmlns=' + \"'\" + 'http:\/\/www.w3.org\/2000\/svg' + \"'\" + ' width=' + \"'\" + '96' + \"'\" + ' height=' + \"'\" + '48' + \"'\" + ' viewport=' + \"'\" + '0 0 100 100' + \"'\" + ' style=' + \"'\" + 'border-radius:60px;background-color:rgba(255,0,0,0.1);fill:black;font-size:24px;' + \"'\" + '&gt;&lt;text y=' + \"'\" + '50%' + \"'\" + '&gt;' + String.fromCodePoint(10067,10068) + csuff + '&lt;\/text&gt;&lt;\/svg&gt;\") 16 0, pointer; }   &lt;\/style&gt;';<br \/>\n    document.head.innerHTML+=dhi;<br \/>\n    } else {<\/font><br \/>\n    document.head.innerHTML+='&lt;style&gt; html { cursor: url(\"data:image\/svg+xml;utf8,&lt;svg xmlns=' + \"'\" + 'http:\/\/www.w3.org\/2000\/svg' + \"'\" + ' width=' + \"'\" + '96' + \"'\" + ' height=' + \"'\" + '48' + \"'\" + ' viewport=' + \"'\" + '0 0 100 100' + \"'\" + ' style=' + \"'\" + 'border-radius:60px;background-color:rgba(255,0,0,0.1);fill:black;font-size:24px;' + \"'\" + '&gt;&lt;text y=' + \"'\" + '50%' + \"'\" + '&gt;' + String.fromCodePoint(10067,10068) + csuff + '&lt;\/text&gt;&lt;\/svg&gt;\") 16 0, pointer; }   &lt;\/style&gt;';<br \/>\n    <font color=blue>}<\/font><br \/>\n<\/code><\/p>\n<p> &#8230; used as per code <font color=blue>exemplified by<\/font> &#8230;<\/p>\n<p><code><br \/>\n    <font color=blue>if ((nominal_numplayers && navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) && ocp) {<br \/>\n    defstyle=defstyle.replace(';background-size:',  ',repeat,repeat' + ';background-size:');<br \/>\n    } else if ((nominal_numplayers && navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) && dhi != '') {<br \/>\n    defstyle=defstyle.replace(';background-size:',  ',repeat,repeat' + ';background-size:');<br \/>\n    } else {<\/font><br \/>\n    defstyle=defstyle.replace(';background-size:',  ',no-repeat,no-repeat' + ';background-size:');<br \/>\n    <font color=blue>}<\/font><br \/>\n    <font color=blue>if ((nominal_numplayers && navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) && ocp) {<br \/>\n    defstyle=defstyle.replace('; } &lt;\/style&gt;', ',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + opc.style.cursor.split('url(')[1].split(') ')[0] + ');  } &lt;\/style&gt;'); \/\/  + ' ' + owidth + ' ' + oheight<br \/>\n    } else if ((nominal_numplayers && navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) && dhi != '') {<br \/>\n    defstyle=defstyle.replace('; } &lt;\/style&gt;', ',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + dhi.split('url(')[1].split(') ')[0] + ');  } &lt;\/style&gt;'); \/\/  + ' ' + owidth + ' ' + oheight<br \/>\n    } else {<\/font><br \/>\n    defstyle=defstyle.replace('; } &lt;\/style&gt;', ',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(\/\/www.rjmprogramming.com.au' + backi + '); } &lt;\/style&gt;'); \/\/  + ' ' + owidth + ' ' + oheight<br \/>\n    <font color=blue>}<\/font><br \/>\n<\/code><\/p>\n<p>So yet again, feel free to try this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).<\/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\/just-javascript-memories-svg-emoji-background-tutorial\/'>Just Javascript Memories SVG Emoji Background Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjmsvgect'>Previous relevant <a target=_blank title='Just Javascript Memories SVG Emoji Cursor Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-memories-svg-emoji-cursor-tutorial\/'>Just Javascript Memories SVG Emoji Cursor Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Memories SVG Emoji Cursor Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_cursor.jpg\" title=\"Just Javascript Memories SVG Emoji Cursor Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Memories SVG Emoji Cursor Tutorial<\/p><\/div>\n<p>The &#8220;Memories&#8221; functionality introduced in yesterday&#8217;s <a title='Just Javascript Memories Card Game Tutorial' href='#jjmcgt'>Just Javascript Memories Card Game Tutorial<\/a> is a game component, and it is good to remember the &#8220;game&#8221; side to that.  If a web application is a game and the player is not being timed, they may feel that freedom to be multitasking, go and do something else, and then come back &#8220;to work the game&#8221;.  In that scenario, it would be quite friendly to offer a mechanism by which to remind the player(s) of the status of the game as they left it.<\/p>\n<p>Even though we are in &#8220;Just Javascript&#8221; (ie. &#8220;No Body Definition&#8221;) mode of use here, we still have CSS to offer a solution here, and we&#8217;ve chosen in the CSS woooooorrrrrllllllddd to research a curiosity we&#8217;ve had &#8220;for just about ever&#8221;.   Can we tailor the webpage <a target=_blank title='CSS cursor information from w3schools' href='https:\/\/www.w3schools.com\/cssref\/pr_class_cursor.asp'>&#8220;cursor&#8221;<\/a> to be &#8220;emoji text content&#8221;.  We&#8217;ve looked this up in the past, and did not succeed on that occasion with the &#8220;url([SVGcontent])&#8221; we thought might be the go.  It was tweaking onto <a target=_blank title='Cursor SVG which can be emoji content great advice' href='https:\/\/dev.to\/alvarosaburido\/use-custom-emoji-as-a-cursor-using-css-3j7'>this great link<\/a> that gave examples for us to succeed this time, thanks, using code such as &#8230;<\/p>\n<p><code><br \/>\n      csuff='';<br \/>\n      var hjg='' + curplayer;<br \/>\n      for (var ipl=0; ipl&lt;hjg.length; ipl++) {<br \/>\n        csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));<br \/>\n      }<br \/>\n      if (ocp) { ocp.style.cursor='url(\"data:image\/svg+xml;utf8,&lt;svg xmlns=' + \"'\" + 'HTTP:\/\/www.w3.org\/2000\/svg' + \"'\" + ' width=' + \"'\" + '96' + \"'\" + ' height=' + \"'\" + '48' + \"'\" + ' viewport=' + \"'\" + '0 0 100 100' + \"'\" + ' style=' + \"'\" + 'border-radius:60px;background-color:rgba(255,0,0,0.1);fill:black;font-size:24px;' + \"'\" + '&gt;&lt;text y=' + \"'\" + '50%' + \"'\" + '&gt;' + String.fromCodePoint(10067,10068) + csuff + '&lt;\/text&gt;&lt;\/svg&gt;\") 16 0, pointer'; }<br \/>\n<\/code><\/p>\n<p> &#8230; that &#8220;ocp&#8221; being the &#8220;evt.target&#8221; of the &#8220;onlick&#8221; event logics previously talked about.  Notice the fallback to those set cursors of <a target=_blank title='CSS cursor information from w3schools' href='https:\/\/www.w3schools.com\/cssref\/pr_class_cursor.asp'>&#8220;the cursor wooooorrrrrllllllddd&#8221;<\/a>.<\/p>\n<p>Along the way we offer variations to the <a target=_blank title='Memories card game information from Wikipedia, thanks' href='https:\/\/en.wikipedia.org\/wiki\/Concentration_(card_game)'>playing rules of Memories<\/a>, too, to add some variety for the user(s).<\/p>\n<p>Yet again, feel free to try this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).<\/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\/just-javascript-memories-svg-emoji-cursor-tutorial\/'>Just Javascript Memories SVG Emoji Cursor Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjmcgt'>Previous relevant <a target=_blank title='Just Javascript Memories Card Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-memories-card-game-tutorial\/'>Just Javascript Memories Card Game Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Memories Card Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_memories.jpg\" title=\"Just Javascript Memories Card Game Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Memories Card Game Tutorial<\/p><\/div>\n<p>Up until yesterday&#8217;s <a title='Just Javascript Card Order Game One Window Tutorial' href='#jjcogowt'>Just Javascript Card Order Game One Window Tutorial<\/a> every mode of execution of our web application involved the Javascript <a target=_blank title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp'>prompt<\/a> (popup) window method of getting information off the user.<\/p>\n<p>Today, though, adding a Memories Card Game new functionality part uses a hybrid Javascript prompt window arrangement &#8230;<\/p>\n<ul>\n<li>a first usage is to use the default Javascript prompt window arrangement you glean from the user the number of players in the Memories Card Game to follow &#8230;<\/li>\n<li>and then <font color=blue>from then on<\/font> &#8230;<br \/>\n<code><br \/>\n  var lasttogglenumber='';<br \/>\n  var lastec='', notyet=false;<br \/>\n  var backi=\"\/rjmquiz_plus.jpg\";<br \/>\n  var fiftytwo=52;<br \/>\n  var message='';<br \/>\n  var lastcard='';<br \/>\n  var lasttto='';<br \/>\n  var gamescoreprefix='';<br \/>\n  var gamescores=[0];<br \/>\n  var lasttmid='';<br \/>\n  var lasttfrom='';<br \/>\n  var lasttoggleto='';<br \/>\n  var lasttogglefrom='';<br \/>\n  var curplayer=1, card_of_play=0;<br \/>\n  var card_game='memories';<br \/>\n  <font color=blue>var nominal_implication='';<br \/>\n  var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(\/\\_\/g,' ').trim().substring(0,1).toUpperCase() + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(\/\\_\/g,' ').trim().substring(1).toLowerCase() + ' card game?', '2') : null;<br \/>\n<br \/>\n  if (nominal_numplayers) {<br \/>\n    if (('' + nominal_numplayers).replace('0','').trim() != '' && ('' + nominal_numplayers).replace('0','').trim().indexOf('-') == -1) {<br \/>\n      var prompt = function(zwords, defwords){ return null; };<br \/>\n      nominal_implication=\"  var prompt = function(zwords, defwords){ return null; };   \";<br \/>\n      fiftytwo=-1;<br \/>\n      backi=\"\/Games\/Memories\/Memories.jpg\";<br \/>\n    } else {<br \/>\n      nominal_numplayers=null;<br \/>\n    }<br \/>\n  }<\/font><br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; &#8220;prompt&#8221; is overridden as above.  That, and overriding the scoring mechanisms, and this same codeset is nearly there towards accommodating our new quite different requirement.<\/p>\n<p>But with &#8220;No Body Definition&#8221;\/&#8221;Just Javascript&#8221; how can we show and implement this new Memories Card Game usage?  It&#8217;s a two way integration, the easier one being &#8230;<\/p>\n<ul>\n<li>offer a place for click\/touch on the default background image<font size=1>ry<\/font> &#8230; and with that webpage reminder &#8230;<\/li>\n<li>what is an independent &#8220;add on&#8221; event methodology available to us, so as not to interfere with event logic that has preceded? <font size=1>&#8230; spoiler alert &#8230;<\/font> double click &#8230;<br \/>\n<code><br \/>\n  ele.addEventListener('dblclick', function(evt) {<br \/>\n     location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';<br \/>\n  });<br \/>\n<\/code><br \/>\n &#8230; (or two clicks quickly in a row) &#8230; <font color=blue>as per<\/font> &#8230;<br \/>\n<code><br \/>\n  <font color=blue>var lastec='', notyet=false;<br \/>\n<br \/> <br \/>\n  function antilastec() {<br \/>\n    lastec='';<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function antinotyet() {<br \/>\n    notyet=true;<br \/>\n  }<\/font><br \/>\n<br \/>\n  ele.addEventListener('click', function(evt) {<br \/>\n       if (evt.touches) {<br \/>\n       if (evt.touches[0].pageX) {<br \/>\n       iourx = evt.touches[0].pageX;<br \/>\n       ioury = evt.touches[0].pageY;<br \/>\n       } else {<br \/>\n       iourx = evt.touches[0].clientX;<br \/>\n       ioury = evt.touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('' + iourx);<br \/>\n       } else if (evt.clientX) {<br \/>\n       iourx = evt.clientX; \/\/ - elemLeft;<br \/>\n       ioury = evt.clientY; \/\/ - elemLeft;<br \/>\n       } else if (!evt.touches) {<br \/>\n       iourx = evt.pageX; \/\/ - elemLeft;<br \/>\n       ioury = evt.pageX; \/\/ - elemLeft;<br \/>\n       }<br \/>\n       <font color=blue>if (('' + iourx + ',' + ioury) == lastec && lastec != '' && notyet) {<br \/>\n         location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';<br \/>\n       } else if (lastec == '') {<br \/>\n         setTimeout(antilastec, 2000);<br \/>\n         setTimeout(antinotyet, 200);<br \/>\n         notyet=false;<br \/>\n         lastec='' + iourx + ',' + ioury;<br \/>\n       } else {<br \/>\n         setTimeout(antilastec, 2000);<br \/>\n         setTimeout(antinotyet, 200);<br \/>\n         notyet=false;<br \/>\n         lastec='' + iourx + ',' + ioury;<br \/>\n       }<\/font><br \/>\n       clickedmaybe();<br \/>\n  });<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p>Again, feel free to try this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?card_memories=y\" title=\"Click picture\">Memories Card Game<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).<\/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\/just-javascript-memories-card-game-tutorial\/'>Just Javascript Memories Card Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjcogowt'>Previous relevant <a target=_blank title='Just Javascript Card Order Game One Window Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-card-order-game-one-window-tutorial\/'>Just Javascript Card Order Game One Window Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Card Order Game One Window Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_flexible.jpg\" title=\"Just Javascript Card Order Game One Window Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Card Order Game One Window Tutorial<\/p><\/div>\n<p>The &#8220;one window&#8221; rather than (52 + 1) = 53 windows scenario set up as a possibility with yesterday&#8217;s <a title='Just Javascript Card Order Game Mobile Tutorial' href='#jjcogmt'>Just Javascript Card Order Game Mobile Tutorial<\/a> had us wondering &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-card-order-game-mobile-tutorial\/'><p>\n &#8230; a one window solution that saves the day for mobile and we see as a good candidate for &#8220;default-ness&#8221; for non-mobile &#8230; we&#8217;ll let that one sink in for a day or so?!\n<\/p><\/blockquote>\n<p> &#8230; and tomorrow is today.  We&#8217;ve decided not to make the one window scenario the default for non-mobile platforms, but serve as a fallback for some of the scenarios mentioned below &#8230;<\/p>\n<ul>\n<li>the user gets blocked from using the popup windows on their non-mobile platform web browser &#8230; big possibility!<\/li>\n<li>the user clicks half way through the popup window incarnation the parent window &#8230; all the child popups disappear behind &#8230; annoying &#8230; <font color=blue>so<\/font> &#8230;<br \/>\n<code><br \/>\n  <font color=blue>var flexible=false;<\/font><br \/>\n<br \/>\n  function secsu() {<br \/>\n    var ewd;<br \/>\n    if (secs == 0) {<br \/>\n      <font color=blue>if (document.URL.indexOf('onewindow=') != -1 || navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n        flexible=false;<br \/>\n      } else {<br \/>\n        flexible=true;<br \/>\n        console.log('Flexible=T');<br \/>\n      }<\/font><br \/>\n      setTimeout(blater, 2500);<br \/>\n    }<br \/>\n    if (eval('' + overallgoes) &lt; 52) {<br \/>\n      secs++;<br \/>\n    } else if (document.title.indexOf('Congratulations') == -1) {<br \/>\n      document.title+=' ... Congratulations!  End of Game!  Refresh webpage to try again.';<br \/>\n    }<br \/>\n    var decs=document.title.split('.');<br \/>\n    if (eval('' + decs.length) &gt;= 3) {<br \/>\n      document.title=document.title.replace('.' + decs[2].split(' ')[0] + ' ', '.' + secs + ' ');<br \/>\n    } else {<br \/>\n    ps=document.title.split('\/')[0].trim();<br \/>\n    pg=document.title.split('\/')[1].split(' ')[0];<br \/>\n    if (ps.indexOf('.') == -1 || pg.indexOf('.') == -1) {<br \/>\n    ps=eval('' + overallscore + '.' + psecs); \/\/eval(document.title.split('\/')[0].trim());<br \/>\n    pg=eval('' + overallgoes + '.' + secs);<br \/>\n    document.title=document.title.replace(document.title.split(' ')[0], '' + overallscore + '.' + psecs + '\/' + '' + overallgoes + '.' + secs);<br \/>\n    \/\/console.log('document.title becomes ' + document.title);<br \/>\n    } else {<br \/>\n    ps=eval(ps);<br \/>\n    pg=eval(pg);<br \/>\n    }<br \/>\n    }<br \/>\n<br \/> <br \/>\n    <font color=blue>if (flexible) {<br \/>\n      if (document.hasFocus()) {<br \/>\n        flexible=false;<br \/>\n        console.log('Flexible=F');<br \/>\n        lastzkq='';<br \/>\n        lastzkl='';<br \/>\n        owidth=oowidth;<br \/>\n        oheight=ooheight;<br \/>\n        for (var igh=0; igh&lt;oplist.length; igh++) {<br \/>\n          opltlistl[igh]=oopltlistl[igh];<br \/>\n          opltlistt[igh]=oopltlistt[igh];<br \/>\n          if (oplist[igh]) {<br \/>\n        console.log('Flexible=F' + igh);<br \/>\n            if (!oplist[igh].closed) {<br \/>\n             try {<br \/>\n              oplist[igh].close();<br \/>\n              oplist[igh]=null;<br \/>\n             } catch(ewd) {<br \/>\n             }<br \/>\n            } else {<br \/>\n             oplist[igh]=null;<br \/>\n            }<br \/>\n          }<br \/>\n        }<br \/>\n      }<br \/>\n    }<\/font><br \/>\n  }<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; document.<a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>() to the rescue again &#8230; the multiple background images of yesterday&#8217;s work being a default part of any incarnation, and whether the click event logic of yesterday becomes relevant depends on &#8230;<\/p>\n<ul>\n<li>if user is a mobile platform user, always relevant<\/li>\n<li>user enters URL with argument like <i>?onewindow=y<\/i> then is always relevant &#8230; else &#8230;<\/li>\n<li>a scenario as above means that from that point on, the <i>multiple background image one window click on cards<\/i> modus operandi becomes relevant<\/li>\n<\/ul>\n<p>We improve the web browser conditions too, if a non-mobile user &#8220;clicks half way through the popup window incarnation the parent window&#8221; in that we programmatically close any open child popup windows!  Phew!<\/p>\n<p>Feel free to try this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform, and if non-mobile it will try child popup windows).<\/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\/just-javascript-card-order-game-one-window-tutorial\/'>Just Javascript Card Order Game One Window Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjcogmt'>Previous relevant <a target=_blank title='Just Javascript Card Order Game Mobile Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-card-order-game-mobile-tutorial\/'>Just Javascript Card Order Game Mobile Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Card Order Game Mobile Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_mobile.jpg\" title=\"Just Javascript Card Order Game Mobile Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Card Order Game Mobile Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Just Javascript Card Order Game Tutorial' href='#jjcogt'>Just Javascript Card Order Game Tutorial<\/a> mobile usage scenario was impractical, in that mobile platforms can not work popup windows in front of a parent window.  Can we convert those non-mobile popup windows into &#8230; well &#8230; what exactly?<\/p>\n<p>Well, in order to keep to our &#8220;Just Javascript&#8221; (ie. &#8220;No Body Definition&#8221;) pledge with this project, we needed to simulate those popups as background image parts, in the sense that you can have multiple background images these days with your HTML.  Even with <font color=blue>html<\/font> as your CSS styling <font color=blue>selector<\/font> &#8230; it pans out &#8230; we needed to prove that today.<\/p>\n<p>Also, today, for the first time, we achieved via &#8230;<\/p>\n<ol>\n<li>comma separated <i>background-repeat: no-repeat;<\/i> list<\/li>\n<li>comma separated <i>background-size<\/i> list (set popup width height list until last one bigger (based on screen.width screen.height) for the parent background image (no-repeat))<\/li>\n<li>comma separated <i>background-position<\/i> list (as per what window.open in non-mobile was using for left top until last one&#8217;s 0px 0px)<\/li>\n<li>comma separated <i>background-image<\/i> list (as per what window.open in non-mobile was using for URL([imageURL]) until last one&#8217;s linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)), url(\/\/www.rjmprogramming.com.au\/rjmquiz_plus.jpg))<\/li>\n<\/ol>\n<p> &#8230; as per (the previous &#8220;window.open&#8221; becomes &#8220;windowopen&#8221;) &#8230;<\/p>\n<p><code><br \/>\n  function windowopen(one, two, three) {<br \/>\n    if (document.URL.indexOf('onewindow=') != -1 || navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n      console.log('Here ' + kq);<br \/>\n      opltlistl.push((three.split('left=')[1].split(',')[0].split(')')[0].split('.')[0] + '.' + one.split('spcp=')[1].split('&')[0]));<br \/>\n      opltlistt.push((three.split('top=')[1].split(',')[0].split(')')[0].split('.')[0] + '.' + kq));<br \/>\n      owidth=eval(three.split('width=')[1].split(',')[0].split(')')[0].split('.')[0]);<br \/>\n      oheight=eval(three.split('width=')[1].split(',')[0].split(')')[0].split('.')[0]);<br \/>\n      if (defstyle.indexOf('background: URL(') != -1) {<br \/>\n      defstyle=defstyle.split('background: URL(')[0] + 'background-repeat:no-repeat;background-size:' + owidth + 'px ' + oheight + 'px;background-position:' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image: url(' + cards[eval('' + donelist[eval(-1 + donelist.length)])] + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } &lt;\/style&gt;'; \/\/  + ' ' + owidth + ' ' + oheight<br \/>\n      } else {<br \/>\n      defstyle=defstyle.replace(';background-image:',  (',' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image:');<br \/>\n      defstyle=defstyle.replace('no-repeat','no-repeat,no-repeat');<br \/>\n      defstyle=defstyle.replace('background-size:' + owidth + 'px ' + oheight + 'px','background-size:' + owidth + 'px ' + oheight + 'px,' + owidth + 'px ' + oheight + 'px');<br \/>\n      defstyle=defstyle.replace('; } &lt;\/style&gt;', ',url(' + cards[eval('' + donelist[eval(0 + ijk)])] + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } &lt;\/style&gt;'); \/\/  + ' ' + owidth + ' ' + oheight<br \/>\n      }<br \/>\n      return null;<br \/>\n    }<br \/>\n    return window.open(one, two, three);<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; a one window solution that saves the day for mobile and we see as a good candidate for &#8220;default-ness&#8221; for non-mobile &#8230; we&#8217;ll let that one sink in for a day or so?!<\/p>\n<p>We needed to add event logic we were not sure would work at the start of the day, and saw it working by the end, with &#8230;<\/p>\n<p><code><br \/>\n  var iourx=-1, ioury=-1;<br \/>\n<br \/>\n  function blater() {<br \/>\n if (1 == 2 && navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n   window.addEventListener('touchstart', function(evt) {<br \/>\n       evt.preventDefault();<br \/>\n       var touches = evt.changedTouches;<br \/>\n       \/\/if (evt.touches) {<br \/>\n       if (touches[0].pageX) {<br \/>\n       iourx = touches[0].pageX;<br \/>\n       ioury = touches[0].pageY;<br \/>\n       } else if (touches[0].clientX) {<br \/>\n       iourx = touches[0].clientX;<br \/>\n       ioury = touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('x:' + iourx);<br \/>\n       \/\/}<br \/>\n       clickedmaybe();<br \/>\n      }, false);<br \/>\n } else {<br \/>\neles = document.querySelectorAll(\"*\")<br \/>\nfor (var ele of eles) {<br \/>\n  console.log('yes well');<br \/>\n  if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n   ele.addEventListener('touchstart', function(evt) {<br \/>\n       evt.preventDefault();<br \/>\n       var touches = evt.changedTouches;<br \/>\n       \/\/if (evt.touches) {<br \/>\n       if (touches[0].pageX) {<br \/>\n       iourx = touches[0].pageX;<br \/>\n       ioury = touches[0].pageY;<br \/>\n       } else if (touches[0].clientX) {<br \/>\n       iourx = touches[0].clientX;<br \/>\n       ioury = touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('x:' + iourx);<br \/>\n       \/\/}<br \/>\n       clickedmaybe();<br \/>\n      }, false);<br \/>\n   ele.addEventListener('touchmove', function(evt) {<br \/>\n       evt.preventDefault();<br \/>\n       var touches = evt.changedTouches;<br \/>\n       \/\/if (evt.touches) {<br \/>\n       if (touches[0].pageX) {<br \/>\n       iourx = touches[0].pageX;<br \/>\n       ioury = touches[0].pageY;<br \/>\n       } else if (touches[0].clientX) {<br \/>\n       iourx = touches[0].clientX;<br \/>\n       ioury = touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('x:' + iourx);<br \/>\n       \/\/}<br \/>\n       clickedmaybe();<br \/>\n      }, false);<br \/>\n   ele.addEventListener('click', function(evt) {<br \/>\n       evt.preventDefault();<br \/>\n       var touches = evt.changedTouches;<br \/>\n       \/\/if (evt.touches) {<br \/>\n       if (touches[0].pageX) {<br \/>\n       iourx = touches[0].pageX;<br \/>\n       ioury = touches[0].pageY;<br \/>\n       } else if (touches[0].clientX) {<br \/>\n       iourx = touches[0].clientX;<br \/>\n       ioury = touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('x:' + iourx);<br \/>\n       \/\/}<br \/>\n       clickedmaybe();<br \/>\n      }, false);<br \/>\n  } else {<br \/>\n  ele.addEventListener('click', function(evt) {<br \/>\n       if (evt.touches) {<br \/>\n       if (evt.touches[0].pageX) {<br \/>\n       iourx = evt.touches[0].pageX;<br \/>\n       ioury = evt.touches[0].pageY;<br \/>\n       } else {<br \/>\n       iourx = evt.touches[0].clientX;<br \/>\n       ioury = evt.touches[0].clientY;<br \/>\n       }<br \/>\n       \/\/alert('' + iourx);<br \/>\n       } else if (evt.clientX) {<br \/>\n       iourx = evt.clientX; \/\/ - elemLeft;<br \/>\n       ioury = evt.clientY; \/\/ - elemLeft;<br \/>\n       } else if (!evt.touches) {<br \/>\n       iourx = evt.pageX; \/\/ - elemLeft;<br \/>\n       ioury = evt.pageX; \/\/ - elemLeft;<br \/>\n       }<br \/>\n       clickedmaybe();<br \/>\n    \/\/alert('here');<br \/>\n  });<br \/>\n  }<br \/>\n}<br \/>\n  }<br \/>\n  }<br \/>\n<\/code><\/p>\n<p>See this in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html------GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html------GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html?onewindow=y\" title=\"Click picture\">live run with single window (good for mobile)<\/a> or <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">default live run<\/a> (for your platform) we, again, welcome you to try for yourself.<\/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\/just-javascript-card-order-game-mobile-tutorial\/'>Just Javascript Card Order Game Mobile Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjcogt'>Previous relevant <a target=_blank title='Just Javascript Card Order Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-card-order-game-tutorial\/'>Just Javascript Card Order Game Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Card Order Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_cardordergame.jpg\" title=\"Just Javascript Card Order Game Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Card Order Game Tutorial<\/p><\/div>\n<p>Today we&#8217;ve made the web application of yesterday&#8217;s <a title='Just Javascript Quiz Drag Tutorial' href='#jjqdt'>Just Javascript Quiz Drag Tutorial<\/a> &#8220;dual purpose&#8221; &#8230;<\/p>\n<ul>\n<li>quiz &#8230; as for yesterday, and before &#8230; and as of today, making more use of the card organizational side to the popup windows we introduce &#8230;<\/li>\n<li>card order game<\/li>\n<\/ul>\n<p>This card order game asks you to force the focus of the correct popup window (to score in the Card Order Game) in the order as designated by the background image part we have added today, and supported by the following Javascript &#8220;mapping&#8221; code &#8230;<\/p>\n<p><code><br \/>\n    var dragorder=[], curdrag=0;<br \/>\n<br \/>\n    var cards=[\"\/\/www.rjmprogramming.com.au\/images\/01s.gif?n=7\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/02s.gif?n=16\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/03s.gif?n=33\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/04s.gif?n=29\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/05s.gif?n=8\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/06s.gif?n=35\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/07s.gif?n=52\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/08s.gif?n=51\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/09s.gif?n=12\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/10s.gif?n=30\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/11s.gif?n=1\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/12s.gif?n=36\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/13s.gif?n=22\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/01h.gif?n=32\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/02h.gif?n=23\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/03h.gif?n=3\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/04h.gif?n=18\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/05h.gif?n=28\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/06h.gif?n=39\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/07h.gif?n=45\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/08h.gif?n=48\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/09h.gif?n=50\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/10h.gif?n=44\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/11h.gif?n=4\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/12h.gif?n=9\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/13h.gif?n=5\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/01d.gif?n=27\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/02d.gif?n=41\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/03d.gif?n=20\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/04d.gif?n=11\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/05d.gif?n=37\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/06d.gif?n=49\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/07d.gif?n=42\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/08d.gif?n=6\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/09d.gif?n=21\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/10d.gif?n=31\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/11d.gif?n=40\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/12d.gif?n=43\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/13d.gif?n=17\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/01c.gif?n=46\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/02c.gif?n=19\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/03c.gif?n=47\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/04c.gif?n=25\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/05c.gif?n=10\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/06c.gif?n=15\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/07c.gif?n=13\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/08c.gif?n=26\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/09c.gif?n=38\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/10c.gif?n=34\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/11c.gif?n=2\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/12c.gif?n=14\",<br \/>\n                           \"\/\/www.rjmprogramming.com.au\/images\/13c.gif?n=24\"];<br \/>\n<br \/> <br \/>\n    for (var ic=1; ic&lt;=cards.length; ic++) {<br \/>\n     found=false;<br \/>\n     for (var jc=1; jc&lt;=cards.length; jc++) {<br \/>\n       if ((cards[eval(-1 + jc)] + '~').indexOf('?n=' + ic + '~') != -1) {<br \/>\n         dragorder.push(eval(-1 + jc));<br \/>\n         cards[eval(-1 + jc)]=cards[eval(-1 + jc)].replace('?n=' + ic, '');<br \/>\n         firstbit+=String.fromCodePoint(eval('' + spcps[eval(-1 + jc)].split('\/')[0])) + ' ';<br \/>\n         found=true;<br \/>\n       }<br \/>\n     }<br \/>\n    }<br \/>\n<\/code><\/p>\n<p> &#8230; and <font color=blue>&#8220;making use of&#8221;<\/font> this and the new codeline as popups are created &#8230; <i>oplist[eval(-1 + oplist.length)].document.name=&#8221; + kl;<\/i> we have &#8230;<\/p>\n<p><code><br \/>\n  function ourprompt(tw, blb, bdef) {<br \/>\n    var kijk;<br \/>\n    <font color=blue>if (oplist[eval('' + tw)].document.name == ('' + dragorder[eval('' + curdrag)]) && eval('' + curdrag) == eval('' + overallgoes)) {<br \/>\n      console.log('Dragorder[' + curdrag + ']=' + dragorder[eval('' + curdrag)] + ' vs tw=' + tw + ' and overall;goes=' + overallgoes);<br \/>\n      var decs=document.title.split('.');<br \/>\n      curdrag++;<br \/>\n      overallgoes++;<br \/>\n      if (eval('' + decs.length) &gt;= 3) {<br \/>\n        document.title=document.title.replace('.' + decs[1] + '.', '.' + curdrag + '\/' + overallgoes + '.');<br \/>\n      }<br \/>\n      oplist[eval('' + tw)].close();<br \/>\n      return null;<br \/>\n    }<\/font><br \/>\n    \/\/ Quiz only code follows<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; code.<\/p>\n<p>It must be in the correct order (and not interrupted by quiz answer completions) to score, and you are timed, so you can try improving over time, using a document.title score presentation as per &#8230;<\/p>\n<p><code><br \/>\n[QuizScore].[CardOrderGameScore]\/[QuizAnswerAttemptCount].[SecondsElapsed] [MultiPlayerQuizScoreGoesBreakdown] is User: Score\/Goes - RJM Programming - April, 2021<br \/>\n<\/code><\/p>\n<p> &#8230; so that both usages for the web application can be accommodated for in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-----GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-----GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a> we welcome you to try for yourself.<\/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\/just-javascriptcard-order-game-tutorial\/'>Just Javascript Card Order Game Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjqdt'>Previous relevant <a target=_blank title='Just Javascript Quiz Drag Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-quiz-drag-tutorial\/'>Just Javascript Quiz Drag Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Quiz Drag Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_dragtwo.jpg\" title=\"Just Javascript Quiz Drag Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Quiz Drag Tutorial<\/p><\/div>\n<p>Adding to yesterday&#8217;s <a title='Just Javascript Quiz CSS Styling Tutorial' href='#jjqcssst'>Just Javascript Quiz CSS Styling Tutorial<\/a> we have added some &#8230;<\/p>\n<ul>\n<li>non-mobile platform, only &#8230;<\/li>\n<li>drag and drop functionality &#8230; for &#8230;<\/li>\n<li>the child popup windows<\/li>\n<\/ul>\n<p> &#8230; achieved through the comparison of &#8230;<\/p>\n<ul>\n<li>original [popupWindow].screenLeft and [popupWindow].screenTop &#8230; initially, to &#8230;<\/li>\n<li>[popupWindow].screenLeft and [popupWindow].screenTop over time<\/li>\n<\/ul>\n<p> &#8230; and if one popup is dragged to overlay another it is closed, or you, as the user, can just drag and drop for clarity, leaving the popup window of the next quiz question out in the open, perhaps.<\/p>\n<p>In order to achieve this, and keep backward compatibility we needed to delay the quiz question prompt window via &#8230;<\/p>\n<ol>\n<li>document.hasFocus() is true &#8230; then if &#8230;<\/li>\n<li>inhouse dragging checks clear it of overlaying another popup (in which case that popup is programmatically closed, allowing another popup to become the &#8220;focus window&#8221;) &#8230; then &#8230;<\/li>\n<li><font color=purple>delay<\/font> (by <font color=blue>8 seconds<\/font>) the prompt window (and in that time the user can be dragging popups <font size=1>(but no popups were harmed in the making of this tutorial)<\/font>) &#8230; via &#8230;<br \/>\n<code><br \/>\n<font color=purple>setTimeout(function() {<\/font> hj=prompt(dp + window.opener.blurb(), def);  if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') != '') { checka(hj); } else { setTimeout(pa,10000); }  aminmiddle=false;  <font color=purple>}<\/font><font color=blue>, 8000<\/font><font color=purple>)<\/font>;<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p> &#8230; you can see in amongst <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----GETME\" title=\"cards_usefocus.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html----GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a> you are welcome to try for yourself &#8230; best on non-mobile.<\/p>\n<p>Still &#8220;No Body Definition&#8221;, &#8220;Just Javascript&#8221;!<\/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\/just-javascript-quiz-drag-tutorial\/'>Just Javascript Quiz Drag Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjqcssst'>Previous relevant <a target=_blank title='Just Javascript Quiz CSS Styling Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-quiz-css-styling-tutorial\/'>Just Javascript Quiz CSS Styling Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Quiz CSS Styling Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_css.jpg\" title=\"Just Javascript Quiz CSS Styling Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Quiz CSS Styling Tutorial<\/p><\/div>\n<p>Our &#8220;Just Javascript&#8221; adage used throughout this blog posting thread, up until today, headed by yesterday&#8217;s <a title='Just Javascript Quiz Content Management Tutorial' href='#jjqcmt'>Just Javascript Quiz Content Management Tutorial<\/a> needs more explanation.  Really what we are trying to do might better be described as &#8220;No Body Definition&#8221; (ie. no defined document.body) but have &#8230;<\/p>\n<ol>\n<li>an HTML webpage (ie. within &lt;html&gt; and &lt;\/html&gt;) &#8230; has &#8230;<\/li>\n<li>&lt;head&gt; and &lt;\/head&gt; (ie. document.head) content which can be made up of (at least) <i>title, style, script, link, meta<\/i> tags<\/li>\n<\/ol>\n<p>To assert &#8220;Just Javascript&#8221; is just to allow <i>script<\/i> content above, but what we should really say is &#8220;Just Head Content&#8221; but that is not nearly so marketable, is it now?!<\/p>\n<p>The thing is, though, we can dynamically add <i>title, style, link, meta<\/i> tag content within the <i>script<\/i> content, and we do this more than statically define it, to feel better about our ethics saying &#8220;Just Javascript&#8221;.<\/p>\n<p>Dynamically adding <i>style<\/i> CSS styling either &#8230;<\/p>\n<ul>\n<li>using Javascript DOM (not available to us for document.getElementById([elementID] <font size=1>and nor can we use inline CSS via <i>style=&#8221;[CSSstyling]&#8221;<\/i> statically within HTML element code for that same reason<\/font>) ideas today though &#8230; remember &#8220;No Body Definition&#8221; &#8230; but &#8230;<\/li>\n<li>we can append to &lt;head&gt; and &lt;\/head&gt; (for today&#8217;s scenario) as per &#8230;<br \/>\n<code><br \/>\n    document.head.innerHTML+=\"&lt;style&gt; <font color=blue>html<\/font> { background-color: yellow; font-size: 36px; background: URL('<a target=_blank title='\/\/www.rjmprogramming.com.au\/rjmquiz.jpg' href='\/\/www.rjmprogramming.com.au\/rjmquiz.jpg'>\/\/www.rjmprogramming.com.au\/rjmquiz.jpg<\/a>'); background-size: cover; } &lt;\/style&gt;\";<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; allowing (into the scope of our work CSS styling of) background (image(s)) and other background styling ideas that can get us past the anonymous feel the web application had before today.  We tailored the background image above to suit our Quiz and help it be a bit more self explanatory &#8230; thanks CSS styling!  We add onto the child &#8220;card&#8221; popup windows, their own background image colour and pizazz, to cheer things up in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---GETME\" title=\"cards_usefocus.html\">CSS styling enhanced<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html---GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a>.<\/p>\n<p>You may well ask &#8230;<\/p>\n<blockquote><p>\nWhat can we hang our hat on with CSS style selectors without a body element?\n<\/p><\/blockquote>\n<p>Well, we had to step out of our usual comfort zone of CSS styling thinking, and realize, even without that body element we can still use the <font color=blue>html<\/font> selector to &#8220;point at&#8221; the entirety of your webpage of interest.<\/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\/just-javascript-quiz-css-styling-tutorial\/'>Just Javascript Quiz CSS Styling Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjqcmt'>Previous relevant <a target=_blank title='Just Javascript Quiz Content Management Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-quiz-content-management-tutorial\/'>Just Javascript Quiz Content Management Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Quiz Content Management Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_cms.jpg\" title=\"Just Javascript Quiz Content Management Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Quiz Content Management Tutorial<\/p><\/div>\n<p>It feels like an &#8220;onions of the 4th dimension&#8221; idea to allow the user to control the questions and answers behind the workings of yesterday&#8217;s <a title='Just Javascript Quiz Multiple Users Tutorial' href='#jjqmut'>Just Javascript Quiz Multiple Users Tutorial<\/a>&#8216;s web application, featuring &#8220;Just Javascript&#8221;.<\/p>\n<p>It&#8217;s not &#8220;Just Javascript&#8221; we&#8217;re keeping, it&#8217;s &#8220;Just HTML&#8221; client work rather than involving any serverside anything (eg.PHP) and yet this question and answer data could be quite sizeable.  What can we use, given no PHP serverside, and given we&#8217;ve decided not to navigate via <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a>\/<a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> techniques?  How about &#8220;the better than HTTP Cookies&#8221; twins &#8230;<\/p>\n<ul>\n<li><a target=_blank title='window.sessionStorage info' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp'>sessionStorage<\/a> &#8230; and &#8230;<\/li>\n<li><a target=_blank title='window.localStorage info' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp'>localStorage<\/a><\/li>\n<\/ul>\n<p>Yep, set up a means by which these two can store and restore questions and answers entered by the user, using these storage methods above.<\/p>\n<p><code><br \/>\n  function reassess() {<br \/>\n      var retv='', ewq;<br \/>\n      var retcols=[];<br \/>\n      var ir=0;<br \/>\n      if (window.localStorage) {<br \/>\n        try {<br \/>\n          retv=('' + window.localStorage.getItem('cards_usefocus_local')).replace(\/^null$\/g,'');<br \/>\n          if (retv != '') {<br \/>\n            \/\/alert('0:' + retv);<br \/>\n            retcols=decodeURIComponent(retv).split('~');<br \/>\n            sq=[];<br \/>\n            asq=[];<br \/>\n            for (ir=0; ir&lt;retcols.length; ir++) {<br \/>\n              sq.push(retcols[ir].split('?!')[0] + '?');<br \/>\n              asq.push(retcols[ir].split('?!')[1]);<br \/>\n              nomap=false;<br \/>\n              given='';<br \/>\n            }<br \/>\n            return;<br \/>\n          }<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n      }<br \/>\n      if (window.sessionStorage) {<br \/>\n        try {<br \/>\n          retv=('' + window.sessionStorage.getItem('cards_usefocus_session')).replace(\/^null$\/g,'');<br \/>\n          if (retv != '') {<br \/>\n            \/\/alert('1:' + retv);<br \/>\n            retcols=decodeURIComponent(retv).split('~');<br \/>\n            sq=[];<br \/>\n            asq=[];<br \/>\n            for (ir=0; ir&lt;retcols.length; ir++) {<br \/>\n              sq.push(retcols[ir].split('?')[0] + '?');<br \/>\n              asq.push(retcols[ir].split('?')[1]);<br \/>\n              nomap=false;<br \/>\n              given='';<br \/>\n            }<br \/>\n            return;<br \/>\n          }<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n      }<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function assess(what) {<br \/>\n    var ewq, retv='';<br \/>\n    if (what.toLowerCase() == '?x') {<br \/>\n      sslistq=[];<br \/>\n      sslista=[];<br \/>\n      if (window.sessionStorage) {<br \/>\n        try {<br \/>\n          window.sessionStorage.removeItem('cards_usefocus_session');<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n        location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);<br \/>\n        return '';<br \/>\n      }<br \/>\n      return '';<br \/>\n    } else if (what.toLowerCase() == '?!x') {<br \/>\n      lslistq=[];<br \/>\n      lslista=[];<br \/>\n      if (window.localStorage) {<br \/>\n        try {<br \/>\n          window.localStorage.removeItem('cards_usefocus_local');<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n        location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);<br \/>\n        return '';<br \/>\n      }<br \/>\n      return '';<br \/>\n    } else if (what.toLowerCase().indexOf('?!') != -1) {<br \/>\n      if (what.toLowerCase() == '?!') {<br \/>\n        location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);<br \/>\n        return '';<br \/>\n      }<br \/>\n      if (window.localStorage) {<br \/>\n      if (lslistq.length == 0) {<br \/>\n      lslistq.push(what.split('?!')[0]);<br \/>\n      lslista.push(what.split('?!')[1]);<br \/>\n      window.localStorage.setItem('cards_usefocus_local', encodeURIComponent(what));<br \/>\n      } else {<br \/>\n      lslistq.push(what.split('?!')[0]);<br \/>\n      lslista.push(what.split('?!')[1]);<br \/>\n      window.localStorage.setItem('cards_usefocus_local', window.localStorage.getItem('cards_usefocus_local') + encodeURIComponent('~' + what));<br \/>\n      }<br \/>\n      }<br \/>\n      return '';<br \/>\n    } else if (what.toLowerCase().indexOf('?') != -1) {<br \/>\n      if (what.toLowerCase() == '?') {<br \/>\n        location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);<br \/>\n        return '';<br \/>\n      }<br \/>\n      if (window.sessionStorage) {<br \/>\n      if (sslistq.length == 0) {<br \/>\n      sslistq.push(what.split('?')[0]);<br \/>\n      sslista.push(what.split('?')[1]);<br \/>\n      window.sessionStorage.setItem('cards_usefocus_session', encodeURIComponent(what));<br \/>\n      } else {<br \/>\n      sslistq.push(what.split('?')[0]);<br \/>\n      sslista.push(what.split('?')[1]);<br \/>\n      window.sessionStorage.setItem('cards_usefocus_session', window.sessionStorage.getItem('cards_usefocus_session') + encodeURIComponent('~' + what));<br \/>\n      }<br \/>\n      }<br \/>\n      return '';<br \/>\n    } else {<br \/>\n      firstbit='';<br \/>\n      if (window.localStorage) {<br \/>\n        try {<br \/>\n          retv=('' + window.localStorage.getItem('cards_usefocus_local')).replace(\/^null$\/g,'');<br \/>\n          if (retv != '' && nomap) { location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);  }<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n      }<br \/>\n      if (window.sessionStorage) {<br \/>\n        try {<br \/>\n          retv=('' + window.sessionStorage.getItem('cards_usefocus_session')).replace(\/^null$\/g,'');<br \/>\n          if (retv != '' && nomap) { location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);  }<br \/>\n        } catch(ewq) {<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n    return what;<br \/>\n  }<br \/>\n<\/code><\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--GETME\" title=\"cards_usefocus.html\">The fairly significantly changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html--GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a> is worth a look, we figure, for up to 52 players who play in turn.<\/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\/just-javascript-quiz-content-management-tutorial\/'>Just Javascript Quiz Content Management Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjqmut'>Previous relevant <a target=_blank title='Just Javascript Quiz Multiple Users Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-quiz-multiple-users-tutorial\/'>Just Javascript Quiz Multiple Users Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Quiz Multiple Users Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus_multiplayer.jpg\" title=\"Just Javascript Quiz Multiple Users Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Quiz Multiple Users Tutorial<\/p><\/div>\n<p>Adding to yesterday&#8217;s <a title='Just Javascript Quiz via Cards Tutorial' href='#jjqct'>Just Javascript Quiz via Cards Tutorial<\/a> we were surprised how difficult it was to stay with &#8220;Just Javascript&#8221; and allow for multiple player play.<\/p>\n<p>We didn&#8217;t opt for the parent to ask about the number of players, curiously, but on the second quiz answer and on, offered any non first player the chance to identify themselves as a new player into the game by appending their answer with a space character.<\/p>\n<p>The implication of that is that we&#8217;ll want to run Javascript functions of the parent from the children <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\n    oplist[eval(-1 + oplist.length)].document.write(\"&lt;link rel=icon href=\" + cards[kl] + \"&gt;&lt;scr\" + \"ipt type='text\/javascript'&gt; var da='\" + eval(0 + kq) + \"'; var dp='Given answer is integer from 0 to 25 ... \" + sq[kq] + \"'; var def=String.fromCodePoint(\" + spcps[eval('' + kl)].split('\/')[0] + \"); function checka(tpa) { var os=''; var ps=eval(window.opener.document.title.split('\/')[0].trim()); var pg=eval(window.opener.document.title.split('\/')[1].split(' ')[0]); if (tpa.trim() == da) { ps++; os=tpa.split(da)[1];  } else { pg++;  os=tpa.split(tpa.trim())[1];  } window.opener.document.title=ps + os + '\/' + pg + ' is User Score\/Goes'; window.close();  } function pa() { if (document.hasFocus()) {  var hj=prompt(dp<font color=blue> + window.opener.blurb()<\/font>, def); if (hj == null) { hj=''; } if (hj.replace(def,'') == '') { setTimeout(pa,1000);  } else { checka(hj); } } else { setTimeout(pa,1000); } } pa(); &lt;\/scr\" + \"ipt&gt;\");<br \/>\n<\/code><\/p>\n<p> &#8230; accessing &#8230;<\/p>\n<p><code><br \/>\n  function blurb() {  \/\/ theblurb and wblurb are global variables changed elsewhere<br \/>\n    if (wblurb == '  Hello Player 1' && theblurb == '  If you are player 2 rather than player 1 append space to your answer.') {<br \/>\n      theblurb='';<br \/>\n      wblurb='';<br \/>\n    }<br \/>\n    return theblurb + wblurb;<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; giving the rather curious behaviour whereby a Javascript prompt window can be dynamically different from one document.<a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>() incarnation (ie. the user might go away and answer another &#8220;card&#8221; Number Quiz question) to another (even not attending to answering the Javascript prompt window) &#8230; huh?!<\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-GETME\" title=\"cards_usefocus.html\">The significantly changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html-GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a> is worth a look, we figure, for up to 52 players who play in turn.<\/p>\n<hr>\n<p id='jjqct'>Previous relevant <a target=_blank title='Just Javascript Quiz via Cards Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-quiz-via-cards-tutorial\/'>Just Javascript Quiz via Cards Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Quiz via Cards Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/just_javascript_quiz.jpg\" title=\"Just Javascript Quiz via Cards Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Quiz via Cards Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Just Javascript Navigation Tutorial' href='#jjnt'>Just Javascript Navigation Tutorial<\/a> continues our interest in &#8220;Just Javascript&#8221; (or &#8220;No Body&#8221;) web applications.<\/p>\n<p>We think today&#8217;s &#8220;Numbers Quiz&#8221; via a &#8220;Card Deck&#8221; organizational design ups the ante on all this.  We realize now what we have been missing not having involved document.<a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>() in any of our popup window scenarios. Today, at least on non-mobile, we involve 52 such popup windows each containing a &#8220;Number Quiz&#8221; question presented as a Javascript prompt (sub-)window.  This would not be feasible without document.<a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>() as you can tell if you examine the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html_GETME\" title=\"cards_usefocus.html\">cards_usefocus.html<\/a> code behind the &#8220;Just Javascript&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/cards_usefocus.html\" title=\"Click picture\">live run<\/a> best used on your non-mobile platforms where popup windows can sit in front of parent (and beside sibling) windows, whereas mobile platforms open new web browser tabs for all the 52 windows of (a card deck) design.<\/p>\n<p>Look out, too, in the code above, for use of <a target=_blank title='window.opener information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_opener.asp'>window.opener<\/a> back reference from a popup window back to the parent window where the scoring data is held, and updated by each popup window because of that <a target=_blank title='window.opener information from W3Schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_opener.asp'>window.opener<\/a> avaalability.<\/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\/just-javascript-quiz-via-cards-tutorial\/'>Just Javascript Quiz via Cards Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjnt'>Previous relevant <a target=_blank title='Just Javascript Navigation Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-navigation-tutorial\/'>Just Javascript Navigation Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/nobody.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Navigation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/nobody.jpg\" title=\"Just Javascript Navigation Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Navigation Tutorial<\/p><\/div>\n<p>The recent use we made of &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank title='createElement information from W3schools ... thanks' href='https:\/\/www.w3schools.com\/jsref\/met_document_createelement.asp'>document.createElement<\/a>\/<a target=_blank title='click method information from W3schools ... thanks' href='https:\/\/www.w3schools.com\/jsref\/met_html_click.asp#:~:text=The%20click()%20method%20simulates,user%20manually%20clicked%20on%20it.'>click()<\/a><br \/>\n<\/code><\/p>\n<p> &#8230; got us thinking of the &#8220;Just Javascript&#8221; (or No Body) blog posting thread headed by <a title='Just Javascript Webmail No Body Attachment Tutorial' href='#jjwnbat'>Just Javascript Webmail No Body Attachment Tutorial<\/a>.<\/p>\n<p>As such, today we present the very simple (but first time use of the interesting <a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>) &#8220;proof of concept&#8221; &#8230;<\/p>\n<p><code><br \/>\n&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  function dothis() {<br \/>\n  var ais=null;<br \/>\n  var urlis=' ';<br \/>\n  while (urlis != '') {<br \/>\n  if (document.<a target=_blank title='HTML DOM hasFocus information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_hasfocus.asp'>hasFocus<\/a>()) {<br \/>\n  urlis=prompt('Enter URL that we will send you to (exit to stop)', '');<br \/>\n  } else {<br \/>\n  setTimeout(dothis, 2000); \/\/ urlis=' ';<br \/>\n  return;<br \/>\n  }<br \/>\n  if (urlis == null) { urlis=''; }<br \/>\n  if (urlis.toLowerCase() == 'exit') { return; }<br \/>\n<br \/> <br \/>\n  if (urlis.trim() != '') {<br \/>\n    if (urlis.substring(0,1) == '.') { \/\/ relative URL<br \/>\n      urlis=document.URL.split('nobody.htm')[0] + urlis;<br \/>\n    } else if (urlis.substring(0,1) == '\/' && urlis.indexOf('\/\/') == -1) { \/\/ relative URL<br \/>\n      urlis=document.URL.split('\/\/')[0] + '\/\/' + document.URL.split('\/\/')[1].split('\/')[0] + '\/' + urlis;<br \/>\n    } else if (urlis.split('\/')[0].indexOf('.') != -1) { \/\/ absolute URL<br \/>\n      if (urlis.toLowerCase().indexOf('http') != 0) {<br \/>\n        if (urlis.indexOf('\/\/') == 0) {<br \/>\n         urlis=document.URL.split('\/\/')[0] + urlis;<br \/>\n        } else {<br \/>\n         urlis=document.URL.split('\/\/')[0] + '\/\/' + urlis;<br \/>\n        }<br \/>\n      }<br \/>\n    } else { \/\/ relative URL<br \/>\n      urlis=document.URL.split('nobody.htm')[0] + urlis;<br \/>\n    }<br \/>\n    ais=document.createElement('a');<br \/>\n    ais.onclick=function() {  window.open(urlis, '_blank', 'top=100,left=100,width=600,height=600');    };<br \/>\n    if (1 == 2) { ais.href=urlis; }<br \/>\n    ais.target='_blank';<br \/>\n    ais.click();<br \/>\n  }<br \/>\n  }<br \/>\n  setTimeout(dothis, 2000); \/\/ urlis=' ';<br \/>\n  }<br \/>\n<br \/> <br \/>\n  dothis();<br \/>\n<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;\/html&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/nobody.html_GETME\" title='nobody.html'>nobody.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/nobody.html\" title='Click picture'>live run<\/a> link for you to use a Javascript prompt popup window&#8217;s user interaction results to navigate to a new webpage, as applicable.  Bookmarklets may be scarce on the ground, but these &#8220;Just Javascript&#8221; ideas continue the Bookmarklet Spirit of the past!<\/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\/just-javascript-navigation-tutorial\/'>Just Javascript Navigation Tutorial<\/a>.<\/p-->\n<hr>\n<p id='jjwnbat'>Previous relevant <a target=_blank title='Just Javascript Webmail No Body Attachment Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-webmail-no-body-attachment-tutorial\/'>Just Javascript Webmail No Body Attachment Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Webmail No Body Attachment Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtmlattachments.jpg\" title=\"Just Javascript Webmail No Body Attachment Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Webmail No Body Attachment Tutorial<\/p><\/div>\n<p>A &#8220;hard liner&#8221; for the proper use of &#8220;business emails&#8221; could argue that an email without an attachment is not productive.  Couldn&#8217;t you just have a face to face meeting instead, if there is just wording in the email (as we somewhat concur with, as an argument)?  So yesterday&#8217;s <a title='Just Javascript Webmail No Body Tutorial' href='#jjwnbt'>Just Javascript Webmail No Body Tutorial<\/a> had that limitation of no email attachment logic, which we remedy today.<\/p>\n<p>And this is where PHP&#8217;s wonderful <a target=_blank title='file-get_contents PHP method information' href='http:\/\/php.net\/manual\/en\/function.file-get-contents.php'>file_get_contents<\/a> (function) means by which we garner (URL) content &#8230;<\/p>\n<ul>\n<li>definitely works with &#8220;relative URLs&#8221; relative to HTTP:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ where today&#8217;s unchanged <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html_GETME\" title=\"webmail_nobody.html\">webmail_nobody.html<\/a> resides &#8230; in &#8220;parsing parlance&#8221; &#8230;<br \/>\n<code><br \/>\n\"relative (URL)\" to the left of any # or ? of what lies to the left of the most right hand \"\/\" (of what the address bar URL is of the webpage you are on)<br \/>\n<\/code><br \/>\n&#8230; so that &#8230;<\/p>\n<ol>\n<li>&#8220;relative URLs&#8221; starting with &#8220;.\/&#8221; (followed by the filename, or just the filename (as you can see us using in today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtmlattachments.jpg\">tutorial picture<\/a>)) refer to the web server directory corresponding to &#8220;HTTP:\/\/www.rjmprogramming.com.au\/HTMLCSS\/&#8221; &#8230; whereas, for example &#8230;<\/li>\n<li>&#8220;relative URLs&#8221; starting with &#8220;..\/&#8221; (followed by the filename) refer to the web server directory corresponding to &#8220;HTTP:\/\/www.rjmprogramming.com.au\/&#8221; &#8230; for example<\/li>\n<\/ol>\n<p> &#8230; and &#8230;\n<\/li>\n<li>might work for &#8220;absolute URLs&#8221; (those that start with https: or HTTP: or even \/\/ (that we beg you not to confuse with <a target=_blank title='Windows UNC information from Wikipedia, thanks' href='https:\/\/en.wikipedia.org\/wiki\/Path_(computing)#Uniform_Naming_Convention'>Windows UNC<\/a> pathnames) that infer a transport protocol of the transport protocol (out of https: or HTTP: or even file:) that got you to the webpage you are currently on), the &#8220;might&#8221; being far more likely on &#8220;absolute URLs&#8221; pointing to the same domain as indicated on the URL of the address bar of the webpage you are currently on<\/li>\n<\/ul>\n<p>Upshot is, the user in their email Body section definitions (still no HTML <i>body<\/i> though!), can throw into any word they use, an &#8220;absolute URL&#8221; of interest, or a &#8220;relative URL&#8221; of interest, of files they want to attach (as attachments, doh!) in their email.<\/p>\n<p>Depending on the email rules though, there are limits as to the amount of attachment data allowed.  We&#8217;ll leave that to you intrepid &#8220;explorers of the Net&#8221; to discover for yourselves.   On this subject though, have you noticed that with the Photos (or Gallery) app Share options, the Email option drops off when you have highlighted a large number of photos or videos or audios to share?  That&#8217;s that email limit coming into play.<\/p>\n<p>So feel free to try this HTML-body-less web application <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html\" title=\"Click picture\">live run<\/a> to see what we mean here.  Though the parent HTML is unchanged today, the new (email) attachment functionality needed <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php---GETME\" title=\"emailhtml.php\">a changed PHP<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php---GETME\" title=\"emailhtml.php\">emailhtml.php<\/a> to make this happen.<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>This (relative URL) &#8220;..\/&#8221; navigation backwards up the hierarchy of the web server directories will, if repeated (ie. nested to &#8220;..\/..\/&#8221; etcetera) too many times, get you into uncharted unnavigable (web server directory) places relative to that web server web site&#8217;s Document Root (below which you can not access in public webpages, normally).   But when you perform similar thinking with &#8220;absolute URLs&#8221; and go &#8220;HTTP:\/\/www.rjmprogramming.com.au\/HTMLCSS\/..\/..\/..\/blahdeblah.jpg&#8221; (in a web browser address bar) for instance, you cannot get into trouble, as you just don&#8217;t get beyond this sending you to (attempt the reference to) &#8220;HTTP:\/\/www.rjmprogramming.com.au\/blahdeblah.jpg&#8221; because on this rjmprogramming.com.au Apache domain the correspondence of the Document Root (web server directory) is to &#8220;HTTP:\/\/www.rjmprogramming.com.au\/&#8221; as the place you are not allowed (and cannot) go below in the hierarchy tree.<\/p>\n<hr>\n<p id='jjwnbt'>Previous relevant <a target=_blank title='Just Javascript Webmail No Body Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-webmail-no-body-tutorial\/'>Just Javascript Webmail No Body Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Just Javascript Webmail No Body Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmailnobody.jpg\" title=\"Just Javascript Webmail No Body Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Just Javascript Webmail No Body Tutorial<\/p><\/div>\n<p>Were you around and interested in our series of about three blog postings in the series on the theme of creating webpage functionality of some interest, involving no Javascript, when we presented <a title='Missing Javascript Audio on Unmute Tutorial' href='#mjaut'>Missing Javascript Audio on Unmute Tutorial<\/a>?  Well, today, it&#8217;s the turn of &#8220;just Javascript&#8221;, which is sort of like what <a target=_blank title='Bookmarklet information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Bookmarklet'>Bookmarklets<\/a> were about.<\/p>\n<p>With today&#8217;s &#8220;just Javascript&#8221; we have to qualify that a little for our webmail emailing sender application with the architecture &#8230;<\/p>\n<ul>\n<li>parent webpage with only document.head and apart from a document.title just a script Javascript tag of content (using  Javascript <a target=_blank title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp'>prompt<\/a> windows to ask for user information) &#8230; <\/li>\n<li>sending (POSTing) data via &#8230;\n<ol>\n<li>Ajax <a target=_blank title='XMLHttpRequest information' href='https:\/\/developer.mozilla.org\/en\/docs\/Web\/API\/XMLHttpRequest'>XMLHttpRequest<\/a> object &#8230; as the conduit for &#8230;<\/li>\n<li><a target=_blank title='FormData object information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/FormData'>FormData<\/a> object<\/li>\n<\/ol>\n<p> &#8230; to <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php--GETME\" title=\"emailhtml.php\">our changed<\/a> &#8230;\n<\/li>\n<li>PHP communication emailing tool <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/emailhtml.php--GETME\" title=\"emailhtml.php\">emailhtml.php<\/a> &#8230; and out to &#8230;<\/li>\n<li>the emailee (out there in the big wide woooorrrrrllllldddd)<\/li>\n<\/ul>\n<p>Guess we find it interesting that you can do all this (sending of email to emailee recipients) with no document.body in sight.<\/p>\n<p>So take a look at that parent <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html_GETME\" title=\"webmail_nobody.html\">webmail_nobody.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmail_nobody.html\" title=\"Click picture\">live run<\/a> link to see what we mean here, and\/or watch the video below &#8230;<\/p>\n<p><video style='width:100%;height:600px;' controls><source src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/webmailnobody.mp4\" type=\"video\/mp4\"><\/source><\/video><\/p>\n<hr>\n<p id='mjaut'>Previous relevant <a target=_blank title='Missing Javascript Audio on Unmute Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/missing-javascript-audio-on-unmute-tutorial\/'>Missing Javascript Audio on Unmute Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_nested.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Missing Javascript Audio on Unmute Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_nested.jpg\" title=\"Missing Javascript Audio on Unmute Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Missing Javascript Audio on Unmute Tutorial<\/p><\/div>\n<p>Our &#8220;third cab off the rank&#8221; following on from yesterday&#8217;s <a title='Missing Javascript Stop Watch Tutorial' href='#mjswt'>Missing Javascript Stop Watch Tutorial<\/a>  &#8220;missing Javascript&#8221; ideas is an HTML div nesting scenario using just &#8230;<\/p>\n<ol>\n<li>HTML<\/li>\n<li>CSS<\/li>\n<\/ol>\n<p> &#8230; again, with some or all of the &#8220;usuals&#8221; below  &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS3 calc information' href='https:\/\/www.htmlgoodies.com\/html5\/css\/using-the-css3-calc-function.html'>calc<\/a> method to assist with defining width and height and size dimensions along with operator &#8220;+&#8221; and\/or &#8220;-&#8221; offset calculation opportunities, and which we&#8217;d have used the Javascript window.<a target=_blank title='Information about Window.getComputedStyle' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/getComputedStyle'>getComputedStyle<\/a> and\/or [element].<a target=_blank title='Javascript getBoundingClientRect method information from Mozilla' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Element\/getBoundingClientRect'>getBoundingClientRect<\/a> methods to cover this (in a much more unwieldy way, as you would probably surmise)<\/li>\n<li>CSS <a target=_blank title='CSS variables information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Using_CSS_variables'>variables<\/a> we started talking about here at <a target=_blank title='CSS Variables Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css-variables-primer-tutorial\/'>CSS Variables Primer Tutorial<\/a><\/li>\n<li>CSS3 <a target=_blank title='CSS3 @keyframes rule information' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes<\/a> rules we first talked about at <a target=_blank title='CSS3 @keyframes Rule Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-keyframes-rule-primer-tutorial\/'>CSS3 @keyframes Rule Primer Tutorial<\/a> that assist with animations that we can make work via &#8230;<\/li>\n<li>CSS3  <a target=_blank title='CSS3 transitions rule information' href='https:\/\/www.w3schools.com\/css\/css3_transitions.asp'>transitions<\/a> for scheduled functionality (we&#8217;d have used Javascript <a target=_blank title='Javascript setTimeout method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'><i>setTimeout<\/i><\/a> (and <a target=_blank title='Javascript setInterval method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'><i>setInterval<\/i><\/a>) methods to cover the same &#8220;territory&#8221;) we first talked about at <a target=_blank title='CSS3 Transition Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-transition-primer-tutorial '>CSS3 Transition Primer Tutorial<\/a> &#8230; specified with CSS Criteria involving &#8230;<\/li>\n<li>CSS Selectors <i>:after<\/i> and <i>:before<\/i> (and often, as for today&#8217;s work, with the <a target=_blank title='CSS content: property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_gen_content.asp'>content:<\/a> CSS property) first talked about here with <a target=_blank title='WordPress Bullet Point CSS Styling Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-bullet-point-css-styling-primer-tutorial\/'>WordPress Bullet Point CSS Styling Primer Tutorial<\/a> &#8230; and, today &#8230;<\/li>\n<li>CSS3 <a target=_blank title='CSS3 transform property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/css3_pr_transform.asp'>transform<\/a> property&#8217;s rotate (<b>and translate and scale<\/b>) setting<b>s<\/b> (for the <b>puppy dog body<\/b> movements) &#8230; as well as the idea that &#8230;<\/li>\n<li><b>On non mobile platforms you can set up the playing of &#8220;audio&#8221; data via the use of an HTML <a target=_blank href='https:\/\/www.w3schools.com\/html\/html5_audio.asp' title='HTML audio element information from w3schools'>audio<\/a> tag with the properties &#8230;\n<ol>\n<li>controls<\/li>\n<li>autostart<\/li>\n<li>loop<\/li>\n<li>muted<\/li>\n<\/ol>\n<p><i><b>Stop Press<\/b><\/i><\/p>\n<p>Above is all fine and good for non-mobile but not so good for mobile, so to keep all happy with the one click, still, is to transfer HTML coding from &#8230;<\/p>\n<p><code><br \/>\n&lt;audio id='myaudio' title='Got a sock in my mouth, so you might want to unmute me!' type='audio\/mp3' style=\"display:none;margin-left:-350px;opacity:0.1;\" autostart muted loop controls src=\"Puppy-sounds.mp3\" \/&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; to &#8230;<\/p>\n<p><code><br \/>\n&lt;!--audio id='myaudio' title='Got a sock in my mouth, so you might want to unmute me!' type='audio\/mp3' style=\"display:none;margin-left:-350px;opacity:0.1;\" autostart muted loop controls src=\"Puppy-sounds.mp3\" \/--&gt;<br \/>\n&lt;audio id='myaudiotwo' title='Got a sock in my mouth, so you might want to unmute me!' type='audio\/mp3' style=\"margin-left:-350px;opacity:0.1;\" autostart=\"0\" loop controls src=\"Puppy-sounds.mp3\" \/&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; and a <i>src=<\/i> URL data source (as we thank <a target=_blank title='Puppy sounds, thanks' href='http:\/\/www.orangefreesounds.com\/puppy-sounds\/'>this link<\/a> for today), or data URI if preferred (which we do for today&#8217;s image data from <a target=_blank title='Image data URI of puppy, thanks' href='https:\/\/stackoverflow.com\/questions\/34914113\/dataimage-gifbase64-images-not-animated'>this link<\/a>, thanks (when we were researching animated GIF data URIs (which we may return to at a later date))<\/b>\n<\/li>\n<\/ul>\n<p> &#8230; that sets up the scenario that all the user has to do to hear the audio is to click the &#8220;muted&#8221; control button, without needing the usual Javascript <i>play()<\/i> methods &#8230; but not on mobile!<\/p>\n<p>Feel free to let the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_nested.html\" title=\"Click picture\">puppy play<\/a>, that uses the HTML and CSS (but no Javascript) of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_nested.html-GETME\" title=\"the_nested.html\">the_nested.html<\/a> and based largely on the previous <a target=_blank title='HTML Nested Centering via Multiple Select Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html-nested-centering-via-multiple-select-tutorial\/'>HTML Nested Centering via Multiple Select Tutorial<\/a> so that <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/the_nested.html-GETME\" title=\"the_nested.html\">these changes<\/a> reflect how we got to the first draft of today&#8217;s work.   Maybe some of the ideas are of interest.  We hope so!<\/p>\n<hr>\n<p id='mjswt'>Previous relevant <a target=_blank title='Missing Javascript Stop Watch Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/missing-javascript-primer-tutorial\/'>Missing Javascript Stop Watch Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_watch.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Missing Javascript Stop Watch Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_watch.jpg\" title=\"Missing Javascript Stop Watch Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Missing Javascript Stop Watch Tutorial<\/p><\/div>\n<p>Following on from yesterday&#8217;s <a title='Missing Javascript Primer Tutorial' href='#mjpt'>Missing Javascript Primer Tutorial<\/a> our second &#8220;cab off the rank&#8221; for &#8220;missing Javascript&#8221; ideas is a stop watch featuring just &#8230;<\/p>\n<ol>\n<li>HTML<\/li>\n<li>CSS<\/li>\n<\/ol>\n<p> &#8230; again, <b>setting up document.body load instigated<\/b> &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS3 calc information' href='https:\/\/www.htmlgoodies.com\/html5\/css\/using-the-css3-calc-function.html'>calc<\/a> method to assist with defining width and height and size dimensions along with operator &#8220;+&#8221; and\/or &#8220;-&#8221; offset calculation opportunities, and which we&#8217;d have used the Javascript window.<a target=_blank title='Information about Window.getComputedStyle' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/getComputedStyle'>getComputedStyle<\/a> and\/or [element].<a target=_blank title='Javascript getBoundingClientRect method information from Mozilla' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Element\/getBoundingClientRect'>getBoundingClientRect<\/a> methods to cover this (in a much more unwieldy way, as you would probably surmise)<\/li>\n<li>CSS <a target=_blank title='CSS variables information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Using_CSS_variables'>variables<\/a> we started talking about here at <a target=_blank title='CSS Variables Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css-variables-primer-tutorial\/'>CSS Variables Primer Tutorial<\/a><\/li>\n<li><b>CSS3 <a target=_blank title='CSS3 @keyframes rule information' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes<\/a> rules we first talked about at <a target=_blank title='CSS3 @keyframes Rule Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-keyframes-rule-primer-tutorial\/'>CSS3 @keyframes Rule Primer Tutorial<\/a> that assist with animations<\/b> that we can make work via &#8230;<\/li>\n<li>CSS3  <a target=_blank title='CSS3 transitions rule information' href='https:\/\/www.w3schools.com\/css\/css3_transitions.asp'>transitions<\/a> for scheduled functionality (we&#8217;d have used Javascript <a target=_blank title='Javascript setTimeout method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'><i>setTimeout<\/i><\/a> (and <a target=_blank title='Javascript setInterval method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'><i>setInterval<\/i><\/a>) methods to cover the same &#8220;territory&#8221;) we first talked about at <a target=_blank title='CSS3 Transition Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-transition-primer-tutorial '>CSS3 Transition Primer Tutorial<\/a> &#8230; specified with CSS Criteria involving &#8230;<\/li>\n<li>CSS Selectors <i>:after<\/i> and <i>:before<\/i> (and often, as for today&#8217;s work, with the <a target=_blank title='CSS content: property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_gen_content.asp'>content:<\/a> CSS property) first talked about here with <a target=_blank title='WordPress Bullet Point CSS Styling Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-bullet-point-css-styling-primer-tutorial\/'>WordPress Bullet Point CSS Styling Primer Tutorial<\/a> &#8230; and, today &#8230;<\/li>\n<li><b>CSS3 <a target=_blank title='CSS3 transform property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/css3_pr_transform.asp'>transform<\/a> property&#8217;s rotate setting (for the stop watch hand movements)<\/b><\/li>\n<\/ul>\n<p> &#8230; which we needed to do to make multiple animations happen, but we used <a target=_blank title='CSS animation-delay property' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-delay.asp'><i>animation-delay:5s;<\/i><\/a> to delay its start.   The hands (second and minute, hence the two animations) are <a target=_blank title='Overlay postings at this blog' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/overlay'>&#8220;overlay&#8221;<\/a> &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS position:absolute information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp'>position:absolute<\/a> property<\/li>\n<li><a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a><\/li>\n<\/ul>\n<p> &#8230; feeling HTML horizontal rule elements that also feature <a target=_blank title='CSS linear gradient information from w3schools' href='https:\/\/www.w3schools.com\/cssref\/func_linear-gradient.asp'>linear gradients<\/a>, to emphasise (in red) the &#8220;pointy end&#8221; of the &#8220;hand conversation&#8221; (good on walls with shadows &#8230; but we digress).<\/p>\n<p>Feel free to let loose the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_watch.html\" title=\"Click picture\">stop watch<\/a> that uses the HTML and CSS (but no Javascript) of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_watch.html_GETME\" title=\"stop_watch.html\">stop_watch.html<\/a> for today&#8217;s instructional information.  Thanks to <a target=_blank title='Clipart - stop watch ... thanks' href='https:\/\/openclipart.org\/detail\/46075\/stop-watch'>Clipart &#8211; stop watch<\/a> for the great clip art used.<\/p>\n<hr>\n<p id='mjpt'>Previous relevant <a target=_blank title='Missing Javascript Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/missing-javascript-primer-tutorial\/'>Missing Javascript Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/calc_use.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Missing Javascript Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/calc_use.jpg\" title=\"Missing Javascript Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Missing Javascript Primer Tutorial<\/p><\/div>\n<p>If you were to ask me which programming component is most vital to web application development, I&#8217;d not be <i>Robinson Crusoe<\/i> in saying &#8230;<\/p>\n<blockquote><p>\nWithout a doubt, Javascript\n<\/p><\/blockquote>\n<p> &#8230; and with that thought in mind we have a two pronged motive to see how far we go developing some web applications that &#8220;don&#8217;t use Javascript&#8221;, calling into play the &#8230;<\/p>\n<ul>\n<li>meaning of &#8220;missing&#8221;, as in, our code is &#8220;missing&#8221; Javascript &#8230; as well as how I feel with the masochism of the exercise, calling into play the &#8230;<\/li>\n<li>meaning of &#8220;missing&#8221;, as in, it&#8217;s hard work writing meaningful web applications without Javascript &#8230; but I guess we&#8217;ll learn a bit from the exercise of <i>&#8220;see where we go&#8221;<\/i>, allowing for the fact, not today, but down the track, that we will allow the use of server-side languages such as PHP<\/li>\n<\/ul>\n<p>Okay, so, given that restriction, let&#8217;s see today&#8217;s challenge, to just use, in a web application &#8230;<\/p>\n<ol>\n<li>HTML<\/li>\n<li>CSS<\/li>\n<\/ol>\n<p> &#8230; and here is where we have to point out that CSS3 introduced to us some functionality that improves the prospects for web application design &#8220;interest&#8221; without using Javascript (though it is hard to convince me even so, that I am not &#8220;missing&#8221; Javascript) here.  CSS3 introduced to us &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS3 calc information' href='https:\/\/www.htmlgoodies.com\/html5\/css\/using-the-css3-calc-function.html'>calc<\/a> method to assist with defining width and height and size dimensions along with operator &#8220;+&#8221; and\/or &#8220;-&#8221; offset calculation opportunities, and which we&#8217;d have used the Javascript window.<a target=_blank title='Information about Window.getComputedStyle' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/getComputedStyle'>getComputedStyle<\/a> and\/or [element].<a target=_blank title='Javascript getBoundingClientRect method information from Mozilla' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Element\/getBoundingClientRect'>getBoundingClientRect<\/a> methods to cover this (in a much more unwieldy way, as you would probably surmise)<\/li>\n<li>CSS <a target=_blank title='CSS variables information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Using_CSS_variables'>variables<\/a> we started talking about here at <a target=_blank title='CSS Variables Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css-variables-primer-tutorial\/'>CSS Variables Primer Tutorial<\/a><\/li>\n<li>CSS3 <a target=_blank title='CSS3 @keyframes rule information' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes<\/a> rules we first talked about at <a target=_blank title='CSS3 @keyframes Rule Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-keyframes-rule-primer-tutorial\/'>CSS3 @keyframes Rule Primer Tutorial<\/a> that assist with animations that we can make work via &#8230;<\/li>\n<li>CSS3  <a target=_blank title='CSS3 transitions rule information' href='https:\/\/www.w3schools.com\/css\/css3_transitions.asp'>transitions<\/a> for scheduled functionality (we&#8217;d have used Javascript <a target=_blank title='Javascript setTimeout method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'><i>setTimeout<\/i><\/a> (and <a target=_blank title='Javascript setInterval method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp'><i>setInterval<\/i><\/a>) methods to cover the same &#8220;territory&#8221;) we first talked about at <a target=_blank title='CSS3 Transition Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-transition-primer-tutorial '>CSS3 Transition Primer Tutorial<\/a> &#8230; specified with CSS Criteria involving &#8230;<\/li>\n<li>CSS Selectors <i>:after<\/i> and <i>:before<\/i> (and often, as for today&#8217;s work, with the <a target=_blank title='CSS content: property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_gen_content.asp'>content:<\/a> CSS property) first talked about here with <a target=_blank title='WordPress Bullet Point CSS Styling Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-bullet-point-css-styling-primer-tutorial\/'>WordPress Bullet Point CSS Styling Primer Tutorial<\/a><\/li>\n<\/ul>\n<p> &#8230; and we use all of these in our Festive Season themed web application today, you can try at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/calc_use.html\" title=\"Click picture\">live run<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/calc_use.html_GETME\" title=\"calc_use.html\">calc_use.html<\/a> (free of any Javascript (but &#8220;why&#8221; springs to mind <font size=1>&#8230; because it is NOT there, perhaps?<\/font>)).<\/p>\n<p>Here&#8217;s the other thing about today.  Our long sought after &#8220;just make the <i>body<\/i> background be semi-transparent&#8221; but not its foreground parts, was solved, for us via the great advice of &#8230;<\/p>\n<ul>\n<li><a target=_blank title='Useful background opacity link' href='https:\/\/stackoverflow.com\/questions\/35669563\/changing-the-opacity-of-background-image-in-css'>https:\/\/stackoverflow.com\/questions\/35669563\/changing-the-opacity-of-background-image-in-css<\/a> was a great link regarding semi-transparent background via CSS like &#8230;<br \/>\n<code><br \/>\n<b>body<\/b> {<br \/>\n  background: URL(https:\/\/www.woodwardenglish.com\/wp-content\/uploads\/2013\/12\/12-days-of-christmas.jpg) no-repeat center center fixed;<br \/>\n  background-size: contain;<br \/>\n}<br \/>\n.banner {<br \/>\n  <b>background: rgba(220,220,255,0.8);<\/b><br \/>\n}<br \/>\n<\/code>\n<\/li>\n<li><a target=_blank title='Useful CSS :root information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/:root'>https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/:root<\/a> taught me how the <i> :root {   } <\/i> CSS descriptor was a good place to define CSS (global) variables, thanks<\/li>\n<li><a target=_blank title='Useful CSS calc information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/calc'>https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/calc<\/a> taught me lots regarding how to use CSS calc method, thanks<\/li>\n<li><a target=_blank title='Useful background opacity link' href='https:\/\/codepen.io\/robinrendle\/embed\/MaVPbo?height=300&#038;theme-id=1&#038;embed-version=2&#038;slug-hash=MaVPbo&#038;default-tab=result&#038;user=robinrendle'>https:\/\/codepen.io\/robinrendle\/embed\/MaVPbo?height=300&#038;theme-id=1&#038;embed-version=2&#038;slug-hash=MaVPbo&#038;default-tab=result&#038;user=robinrendle<\/a> taught me lots of setting up the animation and transitioning in CSS, thanks<\/li>\n<li><a target=_blank title='Useful lyrics resource' href='https:\/\/www.google.com.au\/search?q=lyrics+to+twelve+days+of+christmas&#038;ie=utf-8&#038;oe=utf-8&#038;client=firefox-b-ab&#038;gfe_rd=cr&#038;dcr=0&#038;ei=Z0U8WpLKEobp8wfejKjQDg'>https:\/\/www.google.com.au\/search?q=lyrics+to+twelve+days+of+christmas&#038;ie=utf-8&#038;oe=utf-8&#038;client=firefox-b-ab&#038;gfe_rd=cr&#038;dcr=0&#038;ei=Z0U8WpLKEobp8wfejKjQDg<\/a> is a great link to some lyrics, thanks<\/li>\n<li><a target=_blank title='Background image of great assistance, thanks' href='https:\/\/www.woodwardenglish.com\/wp-content\/uploads\/2013\/12\/12-days-of-christmas.jpg'>https:\/\/www.woodwardenglish.com\/wp-content\/uploads\/2013\/12\/12-days-of-christmas.jpg<\/a> was link to very useful background image, thanks<\/li>\n<\/ul>\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='#d35017' onclick='var dv=document.getElementById(\"d35017\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/css\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35017' 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='#d35043' onclick='var dv=document.getElementById(\"d35043\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/keyframes\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35043' 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='#d35068' onclick='var dv=document.getElementById(\"d35068\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/audio\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d35068' 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='#d45027' onclick='var dv=document.getElementById(\"d45027\"); 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='d45027' 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='#d45034' onclick='var dv=document.getElementById(\"d45034\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/attachment\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d45034' 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='#d52035' onclick='var dv=document.getElementById(\"d52035\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/navigation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52035' 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='#d52040' onclick='var dv=document.getElementById(\"d52040\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/quiz\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52040' 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='#d52045' onclick='var dv=document.getElementById(\"d52045\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/prompt\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52045' 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='#d52051' onclick='var dv=document.getElementById(\"d52051\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/localStorage\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52051' 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='#d52056' onclick='var dv=document.getElementById(\"d52056\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/css\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52056' 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='#d52065' onclick='var dv=document.getElementById(\"d52065\"); 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='d52065' 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='#d52072' onclick='var dv=document.getElementById(\"d52072\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/game\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52072' 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='#d52080' onclick='var dv=document.getElementById(\"d52080\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/background\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52080' 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='#d52088' onclick='var dv=document.getElementById(\"d52088\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/focus\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52088' 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='#d52094' onclick='var dv=document.getElementById(\"d52094\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/prompt\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52094' 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='#d52102' onclick='var dv=document.getElementById(\"d52102\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/cursor\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52102' 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='#d52109' onclick='var dv=document.getElementById(\"d52109\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/emoji\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52109' 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='#d52121' onclick='var dv=document.getElementById(\"d52121\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/animation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52121' 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='#d52131' onclick='var dv=document.getElementById(\"d52131\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/deal\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52131' 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='#d52134' onclick='var dv=document.getElementById(\"d52134\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/joker\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52134' 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='#d52137' onclick='var dv=document.getElementById(\"d52137\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/email\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52137' 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='#d52142' onclick='var dv=document.getElementById(\"d52142\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/submit\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52142' 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='#d52148' onclick='var dv=document.getElementById(\"d52148\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/aesthetics\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52148' 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='#d52151' onclick='var dv=document.getElementById(\"d52151\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/global\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d52151' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>For today&#8217;s work progressing yesterday&#8217;s Just Javascript Five Hundred Card Game Host Aesthetics Tutorial we had as an email to oneself &#8230; Fwd: Click away wider, documenttitle global variable, Know when 500 game ends, and add hybrid 500 card game &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/just-javascript-five-hundred-card-game-follow-suit-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":[2,12,14,37],"tags":[2419,69,84,126,127,2471,2472,2379,157,174,3613,187,211,1604,224,3374,257,3610,2539,281,282,2127,1654,3617,3616,3609,3614,359,2237,364,380,385,400,3615,431,448,452,2730,476,477,1664,3081,576,652,3619,675,2415,739,748,3608,766,830,1968,2076,967,2941,997,1761,1022,3612,3611,1953,3169,1133,1137,1159,1209,1212,2334,1226,1294,3618,1319,1350,1356,1721,1418,3010],"class_list":["post-52151","post","type-post","status-publish","format-standard","hentry","category-ajax","category-elearning","category-event-driven-programming","category-tutorials","tag-aesthetics","tag-ajax","tag-animation-2","tag-background","tag-background-image","tag-background-position","tag-background-repeat","tag-background-size","tag-bookmarklet","tag-button","tag-card-game","tag-cards","tag-click","tag-collaboration","tag-colour","tag-colour-coding","tag-content","tag-content-management","tag-createelement","tag-css","tag-css3","tag-cursor","tag-data-uri","tag-deal","tag-defence","tag-document-createelement","tag-document-queryselectorall","tag-double-click","tag-drag","tag-drag-and-drop","tag-email","tag-emoji","tag-event","tag-fallback","tag-filter","tag-focus","tag-form","tag-formdata","tag-game","tag-games-2","tag-global","tag-global-variable","tag-html","tag-javascript","tag-joker","tag-keyframes","tag-localstorage","tag-mailto","tag-mapping","tag-mclick","tag-memories","tag-navigation","tag-onions","tag-order","tag-popup","tag-preventdefault","tag-programming","tag-prompt","tag-quiz","tag-screenleft","tag-screentop","tag-selector","tag-sessionstorage","tag-share","tag-sharing","tag-sms","tag-style","tag-styling","tag-submit","tag-svg","tag-touch","tag-trick","tag-tutorial","tag-user-experience","tag-ux","tag-variable","tag-webpage","tag-window-opener"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52151"}],"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=52151"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52151\/revisions"}],"predecessor-version":[{"id":52160,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/52151\/revisions\/52160"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=52151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=52151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=52151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}