{"id":58814,"date":"2023-03-31T03:01:26","date_gmt":"2023-03-30T17:01:26","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58814"},"modified":"2023-04-24T12:48:59","modified_gmt":"2023-04-24T02:48:59","slug":"chemistry-wonder-periodic-table-quiz-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/chemistry-wonder-periodic-table-quiz-tutorial\/","title":{"rendered":"Chemistry Wonder Periodic Table Quiz Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Chemistry Wonder Periodic Table Quiz Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/chemistry_wonder.jpg\" title=\"Chemistry Wonder Periodic Table Quiz Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Chemistry Wonder Periodic Table Quiz Tutorial<\/p><\/div>\n<p>We had occasion to revisit <a title='Circular Text or Emoji Periodic Table Quiz Tutorial' href='#cteptqt'>Circular Text or Emoji Periodic Table Quiz Tutorial<\/a> and it set us to wondering if you can just feed a chemical equation or formula into the <a target=_blank title=Google href='https:\/\/google.com'>Google<\/a> search engine and &#8230;<\/p>\n<ul>\n<li>find out good chemistry based information &#8230; <font size=1>Spoiler Alert: yes<\/font><\/li>\n<li>even be set right that an inputted formula is probably inaccurate and a &#8220;nearby&#8221; known compound equation or formula is such and such &#8230; <font size=1>Spoiler Alert: <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/chemistry_wonder.jpg\">yes<\/a><\/font><\/li>\n<\/ul>\n<p>And so we added &#8220;dead end&#8221; but &#8220;non interfering&#8221; Javascript code, such code often working off window.<a target=_blank title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp'>prompt<\/a> user interactive entry functionality, to add this feature into the existant &#8220;Periodic Table Quiz&#8221; functionality, <font color=blue>as per<\/font> &#8230;<\/p>\n<p><code><br \/>\nfunction huhd(dv) {<br \/>\n  <font color=blue>var formula='', nonformula='', wds=[], prevanswer='';<\/font><br \/>\n  var answer='',ans='',wasih='';<br \/>\n  if (isThirtySeven) {<br \/>\n  if (dv.trim().length &lt;= 2 && dv.indexOf('\/') == -1) {<br \/>\n  answer=prompt('What is the name of the element in the Period Table with the symbol ' + dv.trim() + '?  To just find out, but not score, enter a question mark.<font color=blue>  Append on numbers and symbology to name a compound we can look up for you as you please.<\/font>', '');<br \/>\n  if (answer == null) {  answer=''  }<br \/>\n  goes++;<br \/>\n  <font color=blue>wds=answer.split(' ');<br \/>\n  prevanswer=answer;<br \/>\n  answer=answer.replace(wds[eval(-1 + wds.length)], dv.trim() + wds[eval(-1 + wds.length)]).replace(\/NaCl$\/g, 'NaCl()').replace(\/KBr$\/g, 'KBr()').replace(\/CsF$\/g, 'CsF()').replace(\/CdS$\/g, 'CdS()').replace(\/Nacl$\/g, 'Nacl()').replace(\/Kbr$\/g, 'Kbr()').replace(\/Csf$\/g, 'Csf()').replace(\/Cds$\/g, 'Cds()').replace(\/NaCL$\/g, 'NaCL()').replace(\/KBR$\/g, 'KBR()').replace(dv.trim() + wds[eval(-1 + wds.length)], wds[eval(-1 + wds.length)]);<br \/>\n  \/\/alert(answer);<br \/>\n  if (answer.replace('?','').trim() != '' && answer.replace('(','').replace(')','').replace('0','').replace('1','').replace('2','').replace('3','').replace('4','').replace('5','').replace('6','').replace('7','').replace('8','').replace('9','') != answer) {<br \/>\n    nonformula=answer.split('0')[0].split('1')[0].split('2')[0].split('3')[0].split('4')[0].split('5')[0].split('6')[0].split('7')[0].split('8')[0].split('9')[0].split('()')[0];<br \/>\n  \/\/alert('nonformula=' + nonformula + ' dv=' + dv.trim());<br \/>\n    if (prevanswer != answer || 8 == 8) {<br \/>\n    formula=dv.trim() + answer.split(' ')[eval(-1 + answer.split(' ').length)]; \/\/.split('()')[0];<br \/>\n    answer=answer.replace(answer.split(' ')[eval(-1 + answer.split(' ').length)], '');<br \/>\n    formula=formula.split('()')[0];<br \/>\n    } else {<br \/>\n    formula=dv.trim() + answer.substring(nonformula.length).split('()')[0];<br \/>\n    answer=nonformula.trim();<br \/>\n    }<br \/>\n  \/\/alert('formula=' + formula + ' dv=' + dv.trim());<br \/>\n    window.open('\/\/www.google.com\/search?q=' + encodeURIComponent(formula), '_blank', 'top=50,left=50,width=600,height=600');<br \/>\n  }<\/font><br \/>\n  if (answer.trim() == '?') {<br \/>\n   goes--;<br \/>\n   answer='';<br \/>\n   ans=document.head.innerHTML.replace(\/\\\"\/g,\"'\").split(\"'\" + dv.trim() + \":\")[1].split(\"'\")[0];<br \/>\n  }<br \/>\n  if (document.head.innerHTML.toLowerCase().replace(\/\\\"\/g,\"'\").indexOf(\"'\" + dv.trim().toLowerCase() + \":\" + (answer + ans).toLowerCase() + \"'\") != -1) {<br \/>\n   if (answer.trim() != '') { score++; }<br \/>\n   wasih=lastois.innerHTML;<br \/>\n   lastois.innerHTML='&lt;font size=1&gt;&lt;a title=\"Click here for Google search\" target=_blank style=\"color:white;text-decoration:none;cursor:pointer;\" href=\"https:\/\/www.google.com\/search?q=' + encodeURIComponent(answer + ans) + '\"&gt;' + answer + ans + '&lt;\/a&gt;&lt;\/font&gt;&lt;br&gt;' + wasih;<br \/>\n  }<br \/>\n  document.getElementById('pscore').innerHTML='Score: ' + score + '\/' + goes;<br \/>\n  document.getElementById('p36').innerHTML='' + score + '\/' + goes;<br \/>\n  }<br \/>\n  userpicked='';<br \/>\n   } else {<br \/>\n  if (dv.trim() == '') {<br \/>\n    if (userpicked != '') {<br \/>\n     document.getElementById('mynum').innerHTML=userpicked;<br \/>\n    } else {<br \/>\n     document.getElementById('mynum').innerHTML='?';<br \/>\n    }<br \/>\n  } else if (dv.toLowerCase() == 'red' || dv.toLowerCase() == 'green' || dv.toLowerCase() == 'black') {<br \/>\n    userpicked=dv.toLowerCase();<br \/>\n  } else if (dv.substring(0,1) &gt;= '0' && dv.substring(0,1) &lt;= '9') {<br \/>\n    var huhi=eval('' + dv);<br \/>\n    if (huhi &gt;= 0 && huhi &lt;= 36) {<br \/>\n    userpicked=dv;<br \/>\n    document.getElementById('mynum').innerHTML=userpicked;<br \/>\n    } else {<br \/>\n    if (userpicked != '') {<br \/>\n     document.getElementById('mynum').innerHTML=userpicked;<br \/>\n    } else {<br \/>\n     document.getElementById('mynum').innerHTML='?';<br \/>\n    }<br \/>\n    }<br \/>\n  } else {<br \/>\n    if (userpicked != '') {<br \/>\n     document.getElementById('mynum').innerHTML=userpicked;<br \/>\n    } else {<br \/>\n     document.getElementById('mynum').innerHTML='?';<br \/>\n    }<br \/>\n  }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html--------GETME\" title=\"circular_text.html\">today&#8217;s changed Javascript<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html--------GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html?radius=300.360&#038;text=3%3Cspan%3E2%3C%2Fspan%3E1%3Cspan%3E5%3C%2Fspan%3E1%3Cspan%3E9%3C%2Fspan%3E42%3Cspan%3E1%3C%2Fspan%3E22%3Cspan%3E5%3C%2Fspan%3E1%3Cspan%3E7%3C%2Fspan%3E3%3Cspan%3E4%3C%2Fspan%3E62%3Cspan%3E7%3C%2Fspan%3E1%3Cspan%3E3%3C%2Fspan%3E3%3Cspan%3E6%3C%2Fspan%3E1%3Cspan%3E1%3C%2Fspan%3E3%3Cspan%3E0%3C%2Fspan%3E82%3Cspan%3E3%3C%2Fspan%3E1%3Cspan%3E0%3C%2Fspan%3E52%3Cspan%3E4%3C%2Fspan%3E1%3Cspan%3E6%3C%2Fspan%3E3%3Cspan%3E3%3C%2Fspan%3E12%3Cspan%3E0%3C%2Fspan%3E1%3Cspan%3E4%3C%2Fspan%3E3%3Cspan%3E1%3C%2Fspan%3E92%3Cspan%3E2%3C%2Fspan%3E1%3Cspan%3E8%3C%2Fspan%3E2%3Cspan%3E9%3C%2Fspan%3E72%3Cspan%3E8%3C%2Fspan%3E1%3Cspan%3E2%3C%2Fspan%3E3%3Cspan%3E5%3C%2Fspan%3E32%3Cspan%3E6%3C%2Fspan%3E0&#038;notr=y&#038;fontsize=14\" title=\"Click picture\">Periodic Table Quiz live run<\/a> link for you to try the Periodic Table Quiz (now featuring <font size=1>new improved<\/font> &#8220;Chemistry Compound Formula Wonder&#8221; prompting) part of the functionality yourself at a link up the top of the webpage.<\/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\/chemistry-wonder-periodic-table-quiz-tutorial\/'>Chemistry Wonder Periodic Table Quiz Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cteptqt'>Previous relevant <a target=_blank title='Circular Text or Emoji Periodic Table Quiz Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emoji-periodic-table-quiz-tutorial\/'>Circular Text or Emoji Periodic Table Quiz 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emoji Periodic Table Quiz Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/periodic_table_quiz.jpg\" title=\"Circular Text or Emoji Periodic Table Quiz Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emoji Periodic Table Quiz Tutorial<\/p><\/div>\n<p>Meanwhile, back at Circular Text ideas we were wondering if we could add more interest to a quiz by making the circular ends to a similar wheel as the roulette wheel (as discussed with <a title='Circular Text or Emoji Roulette Animation Tutorial' href='#cterat'>Circular Text or Emoji Roulette Animation Tutorial<\/a>) be clickable as the user&#8217;s way to learn about some Periodic Table symbols and correspondent names.<\/p>\n<p>We are forever wondering about ways to hide answers from users, for quizzes and games.  Well, at least for those users not venturing to any Webpage -&gt; View Source ideas, that is.  Today&#8217;s sort of clunky, yet satisfying, way is to hide the Periodic Table element names, along with their symbols, in a single dimension array.  Then we use that, scouring the whole &lt;head&gt; &lt;\/head&gt; using the DOM <b>document.head.innerHTML<\/b> reference approach, in the way below <font size=1>(and we warn that if you do not want help with the game avert your gaze below 1.734523417cm down the webpage)<\/font> &#8230;<\/p>\n<p><code><br \/>\nvar pts=['H:Hydrogen','He:Helium','Li:Lithium','Be:Beryllium','B:Boron','C:Carbon','N:Nitrogen','O:Oxygen','F:Fluorine','Ne:Neon','Na:Sodium','Mg:Magnesium','Al:Aluminium','Si:Silicon','P:Phosphorus','S:Sulphur','Cl:Chlorine','Ar:Argon','K:Potassium','Ca:Calcium','Sc:Scandium','Ti:Titanium','V:Vanadium','Cr:Chromium','Mn:Manganese','Fe:Iron','Co:Cobalt','Ni:Nickel','Cu:Copper','Zn:Zinc','Ga:Gallium','Ge:Germanium','As:Arsenic','Se:Selenium','Br:Bromine','Kr:Krypton'];<br \/>\n<br \/>\nfunction huhd(dv) {<br \/>\n  var answer='',ans='',wasih='';<br \/>\n  if (isThirtySeven) { \/\/ Periodic Table Quiz logic<br \/>\n  if (dv.trim().length &lt;= 2 && dv.indexOf('\/') == -1) {<br \/>\n  answer=prompt('What is the name of the element in the Period Table with the symbol ' + dv.trim() + '?  To just find out, but not score, enter a question mark.', '');<br \/>\n  if (answer == null) {  answer=''  }<br \/>\n  goes++;<br \/>\n  if (answer == '?') {<br \/>\n   answer='';<br \/>\n   ans=<b>document.head.innerHTML<\/b>.replace(\/\\\"\/g,\"'\").split(\"'\" + dv.trim() + \":\")[1].split(\"'\")[0];<br \/>\n  }<br \/>\n  if (<b>document.head.innerHTML<\/b>.toLowerCase().replace(\/\\\"\/g,\"'\").indexOf(\"'\" + dv.trim().toLowerCase() + \":\" + (answer + ans).toLowerCase() + \"'\") != -1) {<br \/>\n   if (answer != '') { score++; }<br \/>\n   wasih=lastois.innerHTML;<br \/>\n   lastois.innerHTML='&lt;font size=1&gt;&lt;a title=\"Click here for Google search\" target=_blank style=\"color:white;text-decoration:none;cursor:pointer;\" href=\"https:\/\/www.google.com\/search?q=' + encodeURIComponent(answer + ans) + '\"&gt;' + answer + ans + '&lt;\/a&gt;&lt;\/font&gt;&lt;br&gt;' + wasih;<br \/>\n  }<br \/>\n  document.getElementById('pscore').innerHTML='Score: ' + score + '\/' + goes;<br \/>\n  document.getElementById('p36').innerHTML='' + score + '\/' + goes;<br \/>\n  }<br \/>\n  userpicked='';<br \/>\n  }<br \/>\n  \/\/ rest for Roulette logic<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; and the other way this array is used is to populate the content of the wheel outer rim, starting with the Roulette Wheel content as a template, via &#8230;<\/p>\n<p><code><br \/>\n function reworked(intis) {  \/\/ RE: pts array Period Table symbol\/name quiz<br \/>\n   \/\/ 3&lt;span&gt;2&lt;\/span&gt;1&lt;span&gt;5&lt;\/span&gt;1&lt;span&gt;9&lt;\/span&gt;42&lt;span&gt;1&lt;\/span&gt;22&lt;span&gt;5&lt;\/span&gt;1&lt;span&gt;7&lt;\/span&gt;3&lt;span&gt;4&lt;\/span&gt;62&lt;span&gt;7&lt;\/span&gt;1&lt;span&gt;3&lt;\/span&gt;3&lt;span&gt;6&lt;\/span&gt;1&lt;span&gt;1&lt;\/span&gt;3&lt;span&gt;0&lt;\/span&gt;82&lt;span&gt;3&lt;\/span&gt;1&lt;span&gt;0&lt;\/span&gt;52&lt;span&gt;4&lt;\/span&gt;1&lt;span&gt;6&lt;\/span&gt;3&lt;span&gt;3&lt;\/span&gt;12&lt;span&gt;0&lt;\/span&gt;1&lt;span&gt;4&lt;\/span&gt;3&lt;span&gt;1&lt;\/span&gt;92&lt;span&gt;2&lt;\/span&gt;1&lt;span&gt;8&lt;\/span&gt;2&lt;span&gt;9&lt;\/span&gt;72&lt;span&gt;8&lt;\/span&gt;1&lt;span&gt;2&lt;\/span&gt;3&lt;span&gt;5&lt;\/span&gt;32&lt;span&gt;6&lt;\/span&gt;0<br \/>\n   var okayis=false, outtis=intis + '&lt;span&gt;\/0&lt;\/span&gt;', <i>sofar=','<\/i>, iso=-1;<br \/>\n   var outtisa='3&lt;span&gt;2&lt;\/span&gt;;1&lt;span&gt;5&lt;\/span&gt;;1&lt;span&gt;9&lt;\/span&gt;;4;2&lt;span&gt;1&lt;\/span&gt;;2;2&lt;span&gt;5&lt;\/span&gt;;1&lt;span&gt;7&lt;\/span&gt;;3&lt;span&gt;4&lt;\/span&gt;;6;2&lt;span&gt;7&lt;\/span&gt;;1&lt;span&gt;3&lt;\/span&gt;;3&lt;span&gt;6&lt;\/span&gt;;1&lt;span&gt;1&lt;\/span&gt;;3&lt;span&gt;0&lt;\/span&gt;;8;2&lt;span&gt;3&lt;\/span&gt;;1&lt;span&gt;0&lt;\/span&gt;;5;2&lt;span&gt;4&lt;\/span&gt;;1&lt;span&gt;6&lt;\/span&gt;;3&lt;span&gt;3&lt;\/span&gt;;1;2&lt;span&gt;0&lt;\/span&gt;;1&lt;span&gt;4&lt;\/span&gt;;3&lt;span&gt;1&lt;\/span&gt;;9;2&lt;span&gt;2&lt;\/span&gt;;1&lt;span&gt;8&lt;\/span&gt;;2&lt;span&gt;9&lt;\/span&gt;;7;2&lt;span&gt;8&lt;\/span&gt;;1&lt;span&gt;2&lt;\/span&gt;;3&lt;span&gt;5&lt;\/span&gt;;3;2&lt;span&gt;6&lt;\/span&gt;'.split(';');       \/\/;0&lt;span&gt;\/0&lt;\/span&gt;';<br \/>\n   for (var i=0; i&lt;pts.length; i++) {<br \/>\n     okayis=false;<br \/>\n     while (!okayis) {<br \/>\n      iso=Math.floor(Math.random() * pts.length);<br \/>\n      if (<i>sofar<\/i>.indexOf(',' + iso + ',') == -1) { okayis=true; <i>sofar<\/i>+='' + iso + ','; }<br \/>\n     }<br \/>\n     if (pts[iso].split(':')[0].length == 1) {<br \/>\n     outtis=outtis.replace(outtisa[i], pts[iso].split(':')[0]);<br \/>\n     } else {<br \/>\n     outtis=outtis.replace(outtisa[i], pts[iso].split(':')[0].substring(0,1) + '&lt;span&gt;' + pts[iso].split(':')[0].substring(1) + '&lt;\/span&gt;');<br \/>\n     }<br \/>\n   }<br \/>\n   return outtis;<br \/>\n }<br \/>\n<\/code><\/p>\n<p> &#8230; also illustrating our <i>sofar<\/i> var<font size=1>iable<\/font> oft used technique of appending to a delimited single string that is <a target=_blank title='Javascript indexOf function information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_indexof.asp'>&#8220;indexOf&#8221;<\/a>ed against to determine if an action has previously been taken, and, in this case here, not do it more than once.<\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-------GETME\" title=\"circular_text.html\">Today&#8217;s changed HTML and CSS<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-------GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link for you to try the Periodic Table Quiz part of the functionality yourself at a link up the top of the webpage.<\/p>\n<hr>\n<p id='cterat'>Previous relevant <a target=_blank title='Circular Text or Emoji Roulette Animation Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emoji-roulette-animation-tutorial\/'>Circular Text or Emoji Roulette 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emoji Roulette Animation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/roulette_wheel_action.gif\" title=\"Circular Text or Emoji Roulette Animation Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emoji Roulette Animation Tutorial<\/p><\/div>\n<p>As we left off with the recent <a title='Circular Text or Emoji Roulette Game Tutorial' href='#ctergt'>Circular Text or Emoji Roulette Game Tutorial<\/a> we wanted to improve on the animation aspects to representing the roulette wheel ball, but still only involve &#8230;<\/p>\n<ul>\n<li>emoji (content) for HTML elements styled by &#8230;<\/li>\n<li>CSS <a target=_blank title='CSS3 @keyframes rule information' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes<\/a> <a target=_blank title='CSS3 transitions rule information' href='https:\/\/www.w3schools.com\/css\/css3_transitions.asp'>transition<\/a> animations &#8230; <i>in orbit<\/i><\/li>\n<\/ul>\n<p> &#8230; and it was this <i>in orbit<\/i> bit that daunted us most.  That is, until we &#8230;<\/p>\n<ul>\n<li>read the <a target=_blank title='Great link, thanks' href='https:\/\/www.useragentman.com\/blog\/2013\/03\/03\/animating-circular-paths-using-css3-transitions\/'>great advice of this link<\/a>, thanks &#8230; and enjoyed the wonder of &#8230;<\/li>\n<li>how dynamic and easy dynamic CSS styling can be simply by adding &lt;style&gt; &lt;\/style&gt; encased styling to the end of document.body.innerHTML &#8230; via &#8230;<br \/>\n<code><br \/>\nfunction animateonorbit(bid, ccl, cct, anrad, fhl) { \/\/ thanks to https:\/\/www.useragentman.com\/blog\/2013\/03\/03\/animating-circular-paths-using-css3-transitions\/<br \/>\n    var dba='&lt;style&gt; #' + bid + ' { display:block;  top:' + cct + 'px; ';<br \/>\n    dba+=' left:' + ccl + 'px; position:absolute; -moz-border-radius: 12px; border-radius: 12px;  ';<br \/>\n    dba+=' filter: alpha(opacity=80); -moz-opacity:0.8; -khtml-opacity: 0.8; opacity: 0.8; transform: rotate(45deg) translateX(' + anrad + 'px) rotate(-45deg); ';<br \/>\n    dba+=' animation:animateonorbit  ' + fhl + 's linear infinite; -webkit-animation:animateonorbit ' + fhl + 's linear infinite; z-index:79; } ';<br \/>\n    dba+=' @keyframes animateonorbit {  from   { \ttransform: rotate(0deg) translateX(' + anrad + 'px) rotate(0deg);    } ';<br \/>\n    dba+='  to     { transform: rotate(360deg) translateX(' + anrad + 'px) rotate(-360deg);    } ';<br \/>\n    dba+=' @-webkit-keyframes animateonorbit {  from   { \t-webkit-transform: rotate(0deg) translateX(' + anrad + 'px) rotate(0deg);    } ';<br \/>\n    dba+='  to     { -webkit-transform: rotate(360deg) translateX(' + anrad + 'px) rotate(-360deg);    } &lt;\/style&gt; ';<br \/>\n    document.body.innerHTML+=dba;<br \/>\n    lasto=document.getElementById(bid);<br \/>\n    document.getElementById(bid).style.display='block';<br \/>\n}<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html------GETME\" title=\"circular_text.html\">Today&#8217;s changed HTML and CSS<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html------GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link for you to try the Roulette Wheel (and its animated ball) part of the functionality yourself at a link up the top of the webpage.<\/p>\n<hr>\n<p id='ctergt'>Previous relevant <a target=_blank title='Circular Text or Emoji Roulette Game Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emoji-roulette-game-tutorial\/'>Circular Text or Emoji Roulette 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emoji Roulette Game Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/roulette.jpg\" title=\"Circular Text or Emoji Roulette Game Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emoji Roulette Game Tutorial<\/p><\/div>\n<p>Extending the recent <a title='Circular Text or Emoji Onclick Tutorial' href='#cteot'>Circular Text or Emoji Onclick Tutorial<\/a> circular text ideas, today we are starting out on a game that uses a Roulette Wheel as its basic web page component.  To all those &#8220;graphically challenged&#8221; users, like me, we do not use any homegrown imagery of any sort, instead just use &#8230;<\/p>\n<ul>\n<li>HTML basis of design &#8230;<\/li>\n<li>CSS as &#8230;\n<ol>\n<li>&lt;head&gt; &lt;\/head&gt; styling &#8230;<br \/>\n<code><br \/>\n&lt;style&gt;<br \/>\n .roulettered { color:white; background:<a target=_blank title='CSS3 linear gradient information from w3schools' href='http:\/\/www.w3schools.com\/css\/css3_gradients.asp'>linear-gradient<\/a>(to top,orange 92%,red 8%);    }<br \/>\n .rouletteblack { color:white; background:linear-gradient(to top,orange 92%,black 8%);    }<br \/>\n .roulettegreen { color:white; background:linear-gradient(to top,orange 92%,green 8%);    }<br \/>\n&lt;\/style&gt;<br \/>\n<\/code>\n<\/li>\n<li>inline HTML styling<\/li>\n<\/ol>\n<\/li>\n<li>Javascript DOM dynamic styling and animation (the roulette wheel is sent spinning via <a target=_blank title='Javascript setTimeout method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'><i>setTimeout<\/i><\/a> Javascript timer logic)<\/li>\n<\/ul>\n<p> &#8230; involving our original &#8230;<\/p>\n<ul>\n<li>&#8220;circular text&#8221; as the numbers near the outer rim of the roulette wheel<\/li>\n<li>background border-radius parts in the middle (&#8216;atend&#8217; element) as the ribbing bits that form the rest of the roulette wheel<\/li>\n<\/ul>\n<p> &#8230; and, so far, the one ball emoji at the end of a user turn.  This last bit is where we feel we shall work at more improvement.<\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-----GETME\" title=\"circular_text.html\">Today&#8217;s changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-----GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link for you to try the Roulette Wheel part of the functionality yourself at a link up the top of the webpage.  You can guess a number or red or black or green colours, and odds based scoring is applied.<\/p>\n<hr>\n<p id='cteot'>Previous relevant <a target=_blank title='Circular Text or Emoji Onclick Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emoji-onclick-tutorial\/'>Circular Text or Emoji Onclick 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emoji Onclick Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ctlinkbetter.jpg\" title=\"Circular Text or Emoji Onclick Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emoji Onclick Tutorial<\/p><\/div>\n<p>In this increasingly connected online world, it can be surprising when an image looking part of a webpage cannot be linked to.  The unusual thing about emojis is their way to &#8230;<\/p>\n<ul>\n<li>be part of the textual web armoury &#8230; yet &#8230;<\/li>\n<li>look like an image<\/li>\n<\/ul>\n<p> &#8230; and, as such, it would definitely not offend, maybe even &#8220;tickle pink&#8221; the user to have an emoji be linked to further information.  In the case of the emojis featuring in yesterday&#8217;s <a title='Circular Text or Emojis Genericity Tutorial' href='#ctegt'>Circular Text or Emojis Genericity Tutorial<\/a> which are country flags (that are compound emojis) you can query the Google search engine with the contents of the <a target=_blank title='Iemoji website' href='http:\/\/www.iemoji.com'>Iemoji<\/a> website webpages (such as <a target=_blank title='Japan flag emoji information from Iemoji' href='https:\/\/www.iemoji.com\/view\/emoji\/173\/flags\/japan'>Japan&#8217;s<\/a> flag emoji one) with the right column data next to the &#8220;Decimal HTML Entity&#8221; left column.  In fact, as we often urge our students, just copy this Decimal HTML Entity value straight up into the address bar, and your favourite search engine is likely to come up with a (in my case Google) search engine URL like &#8230;<\/p>\n<p><code><br \/>\n<a target=_blank title='Japan flag emoji search' href='https:\/\/www.google.com\/search?client=firefox-b-ab&#038;q=%26%23127471%3B+%26%23127477%3B'>https:\/\/www.google.com\/search?client=firefox-b-ab&q=%26%23127471%3B+%26%23127477%3B<\/a><br \/>\n<\/code><\/p>\n<p> &#8230; getting you (emoji onclick event) links to some pretty pertinent information about Japan within seconds, let alone what you might find under the Images and\/or Videos menu subsearches.  Notice how integrated this is with the <a target=_blank title='Google search engine' href='http:\/\/google.com'>Google<\/a> search engine webpages &#8230;<\/p>\n<blockquote cite='https:\/\/emojipedia.org\/flag-for-japan\/'><p>\nThe Flag: Japan emoji is a sequence of the <b><a target=_blank title='Regional Indicator Symbol Letter J' href='https:\/\/emojipedia.org\/regional-indicator-symbol-letter-j\/'>&#127471; Regional Indicator Symbol Letter J<\/a> and <a target=_blank title='Regional Indicator Symbol Letter P' href='https:\/\/emojipedia.org\/regional-indicator-symbol-letter-p\/'>&#127477; Regional Indicator Symbol Letter P<\/a> emojis.<\/b> These display as a single emoji on supported platforms.\n<\/p><\/blockquote>\n<p> &#8230; showing you how ISO 2-letter codes are linked to emoji country flag Decimal HTML Entity creation construction rules.<\/p>\n<p><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html---GETME\" title=\"circular_text.html\">Today&#8217;s changed HTML<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html---GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link for you to try yourself (or try the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.php-GETME\" title=\"circular_text.html\">changed PHP<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.php-GETME\" title=\"circular_text.php\">circular_text.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.php\" title=\"Click picture\">live run<\/a>), then, features &#8230;<\/p>\n<ul>\n<li>changed emoji linking, the one thing left to say about this being, that the &#8220;missing link&#8221; between text and link HTML elements can be that elements that start as text can be made to act like linked elements (later) via (definitely the first, and sometimes, but not today, the second) CSS styling (via inline HTML CSS style=&#8221;&#8221;) &#8230;\n<ol>\n<li>cursor:pointer;<\/li>\n<li>text-decoration:underline;<\/li>\n<\/ol>\n<p> &#8230; we make happen within the webpage&#8217;s Javascript (DOM) code\n<\/li>\n<li>functionality to be able to increase or decease the circular text&#8217;s font size (that being the way to control an emoji size as well, that reminds you that emojis are text, just not that very small part of the text world with ascii codes less than 256)<\/li>\n<li>a very subtle <a target=_blank title='Radial gradient CSS information from w3schools' href='https:\/\/www.w3schools.com\/csSref\/func_radial-gradient.asp'>radial gradient<\/a> background replaces the single colour background colour for the HTML &#8216;atend&#8217; div element within the circular text <b>as per<\/b> &#8230;<br \/>\n<code><br \/>\n  if (document.getElementById('atend').innerHTML != '') { document.getElementById('atend').style.background='<b>radial-gradient(circle,#c0d0f0,#c3d3f3)<\/b>'; } \/\/#c0d0f0'; } \/\/'transparent';<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<hr>\n<p id='ctegt'>Previous relevant <a target=_blank title='Circular Text or Emojis Genericity Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emojis-genericity-tutorial\/'>Circular Text or Emojis Genericity 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emojis Genericity Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ctbiggerbetter.jpg\" title=\"Circular Text or Emojis Genericity Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emojis Genericity Tutorial<\/p><\/div>\n<p>A major consideration in any &#8220;genericity&#8221; drive you have for your web applications is to allow for a large amount of user entered data, perhaps a surprising amount.  If you offer a textbox to enter data, then a user may enter a hugely long, and perhaps valid, field.  If we&#8217;d left it at the scenario of yesterday&#8217;s <a title='Circular Text or Emojis Analogue Clock Tutorial' href='#cteact'>Circular Text or Emojis Analogue Clock Tutorial<\/a>, though, we&#8217;d have been restricted to a textbox entry of about 800 characters for the rjmprogramming.com.au domain.  In the first of the improvements below, then, we try to cater for this via &#8230;<\/p>\n<ul>\n<li>for textbox entries that are long we now populate an HTML form method=POST action=<a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.php_GETME\" title=\"circular_text.php\">circular_text.php<\/a> where we intervene at appropriate places with the large data items &#8230; and today we also &#8230;<\/li>\n<li>make sure compound emojis like the country flags work (where the great <a target=_blank title='Iemoji website' href='http:\/\/www.iemoji.com'>Iemoji<\/a> website webpages such as <a target=_blank title='Japan flag emoji information from Iemoji' href='https:\/\/www.iemoji.com\/view\/emoji\/173\/flags\/japan'>Japan&#8217;s<\/a> flag emoji one, become so useful) &#8230; and we test that out with a &#8230;<\/li>\n<li><a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/index' title='Google Chart Tools provide a perfect way to visualize data on your website. From simple line charts to complex hierarchical tree maps, the chart galley provides a large number of well-designed chart types. Populating your data is easy using the provided client- and server-side tools.'>Google Chart<\/a> <a target=_blank href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/piechart' title='Google Pie Charts'>Pie Chart<\/a> content inside the circular text<\/li>\n<\/ul>\n<p> &#8230; and an <b>interesting thing<\/b> happened with the &#8220;getting to work&#8221; of today&#8217;s textbox entry (for a radius value of 570) you can try &#8230;<\/p>\n<p><!--code>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127464;&amp;amp;#127475;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127470;&amp;amp;#127475;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127482;&amp;amp;#127480;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127470;&amp;amp;#127465;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127463;&amp;amp;#127479;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127477;&amp;amp;#127472;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127475;&amp;amp;#127468;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127463;&amp;amp;#127465;&nbsp;&nbsp;&nbsp;&nbsp;&amp;amp;#127479;&amp;amp;#127482;&nbsp;&nbsp;&nbsp;&amp;amp;#127471;&amp;amp;#127477;&nbsp;&nbsp;&nbsp;&amp;amp;#127474;&amp;amp;#127485;&nbsp;&nbsp;&nbsp;&amp;amp;#127477;&amp;amp;#127469;&nbsp;&nbsp;&amp;amp;#127483;&amp;amp;#127475;&nbsp;&nbsp;&amp;amp;#127466;&amp;amp;#127481;&nbsp;&nbsp;&amp;amp;#127465;&amp;amp;#127466;&nbsp;&nbsp;&amp;amp;#127466;&amp;amp;#127468;&nbsp;&amp;amp;#127470;&amp;amp;#127479;&nbsp;&amp;amp;#127481;&amp;amp;#127479;&nbsp;&amp;amp;#127481;&amp;amp;#127469;&nbsp;&amp;amp;#127464;&amp;amp;#127465;&nbsp;&amp;amp;#127467;&amp;amp;#127479;&nbsp;&amp;amp;#127468;&amp;amp;#127463;&nbsp;&amp;amp;#127470;&amp;amp;#127481;&lt;iframe scrolling=no frameborder=0 style=border-radius:600px;width:900px;height:600px;z-index:23;margin-left:87px;margin-top:270px; src=https:\/\/www.rjmprogramming.com.au\/PHP\/PieChart\/pie_chart.php?title=<b>%c2%a0<\/b>%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0Country%20Populations&amp;onclick=y&amp;task=Country&amp;desc=Populations&amp;data=,%20[~https;China,1347000000,India,1241000000,United%20States,312000000,Indonesia,238000000,Brazil,197000000,Pakistan,177000000,Nigeria,162000000,Bangladesh,151000000,Russia,143000000,Japan,128000000,Mexico,115000000,Philippines,96000000,Vietnam,88000000,Ethiopia,87000000,Germany,81800000,Egypt,82600000,Iran,78000000,Turkey,74000000,Thailand,69500000,Congo,67800000,France,63300000,United%20Kingdom,62700000,Italy,60800000~,100]#bitsatend&gt;&lt;\/iframe&gt;\n<\/code--><\/p>\n<p><code><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127464;&amp;#127475;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127470;&amp;#127475;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127482;&amp;#127480;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127470;&amp;#127465;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127463;&amp;#127479;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127477;&amp;#127472;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127475;&amp;#127468;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127463;&amp;#127465;&nbsp;&nbsp;&nbsp;&nbsp;&amp;#127479;&amp;#127482;&nbsp;&nbsp;&nbsp;&amp;#127471;&amp;#127477;&nbsp;&nbsp;&nbsp;&amp;#127474;&amp;#127485;&nbsp;&nbsp;&nbsp;&amp;#127477;&amp;#127469;&nbsp;&nbsp;&amp;#127483;&amp;#127475;&nbsp;&nbsp;&amp;#127466;&amp;#127481;&nbsp;&nbsp;&amp;#127465;&amp;#127466;&nbsp;&nbsp;&amp;#127466;&amp;#127468;&nbsp;&amp;#127470;&amp;#127479;&nbsp;&amp;#127481;&amp;#127479;&nbsp;&amp;#127481;&amp;#127469;&nbsp;&amp;#127464;&amp;#127465;&nbsp;&amp;#127467;&amp;#127479;&nbsp;&amp;#127468;&amp;#127463;&nbsp;&amp;#127470;&amp;#127481;&lt;iframe frameborder=0 style=border-radius:600px;width:900px;height:600px;z-index:23;margin-left:87px;margin-top:270px; src=https:\/\/www.rjmprogramming.com.au\/PHP\/PieChart\/pie_chart.php?title=<b>%c2%a0<\/b>%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0%c2%a0Country%20Populations&amp;onclick=y&amp;task=Country&amp;desc=Populations&amp;data=,%20[~https;China,1347000000,India,1241000000,United%20States,312000000,Indonesia,238000000,Brazil,197000000,Pakistan,177000000,Nigeria,162000000,Bangladesh,151000000,Russia,143000000,Japan,128000000,Mexico,115000000,Philippines,96000000,Vietnam,88000000,Ethiopia,87000000,Germany,81800000,Egypt,82600000,Iran,78000000,Turkey,74000000,Thailand,69500000,Congo,67800000,France,63300000,United%20Kingdom,62700000,Italy,60800000~,100]#bitsatend&gt;&lt;\/iframe&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; where the use of <b>%c2%a0<\/b> creates whitespace but isn&#8217;t cleared by your normal trim functions, which is how we managed to get our Pie Chart title centralized enough not to be cut off by the HTML iframe border-radius applied to it.  Cute, huh?!<\/p>\n<p>Here is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html--GETME\" title=\"circular_text.html\">today&#8217;s changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html--GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link for you to try yourself.<\/p>\n<hr>\n<p id='cteact'>Previous relevant <a target=_blank title='Circular Text or Emojis Analogue Clock Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emojis-analogue-clock-tutorial\/'>Circular Text or Emojis Analogue Clock 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emojis Analogue Clock Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ctmorebetter.jpg\" title=\"Circular Text or Emojis Analogue Clock Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emojis Analogue Clock Tutorial<\/p><\/div>\n<p>Often a good way to proceed to challenge genericity issues with a web application you think has potential to be more than it appears is to make it be the missing piece to another web application and interface to it.  This is the scenario, today, putting together yesterday&#8217;s &#8230;<\/p>\n<ul>\n<li><a title='Circular Text or Emojis Primer Tutorial' href='#ctept'>Circular Text or Emojis Primer Tutorial<\/a> &#8230; and adapt it to an older &#8230;<\/li>\n<li><a title='Analogue Clock Timezone Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/analogue-clock-timezone-tutorial\/'>Analogue Clock Timezone Tutorial<\/a> web application, that eventually became so much more than its top left analogue clock missing the hour numbers quite useful for mere mortal sanity purposes<\/li>\n<\/ul>\n<p>This interfacing match is great, as it fills in a gap, but there are a couple of things to overcome, those being &#8230;<\/p>\n<ol>\n<li>allow for a circular text component consist of more than one character, and here we allow the user to put &#8230;<br \/>\n<code><br \/>\n1&lt;span&gt;2&lt;\/span&gt;<br \/>\n<\/code><br \/>\n &#8230; to show &#8220;12&#8221; for example\n <\/li>\n<li>allow for an element like the HTML iframe &#8220;child&#8221; element be the contents within a newly introduced HTML div element for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-GETME\" title=\"circular_text.html\">today&#8217;s changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html-GETME\" title=\"circular_text.html\">circular_text.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> placed into the &#8230; <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA'>anyone, anyone<\/a>? &#8230; yes, Franklin D. Roosevelt, that would be in the circle the circular text goes around, and we do that stylewise via (on the fly Javascript) code making use of the centrally justified circular text element (curiously causing rect.width and rect.height below to be zero) &#8230;<\/p>\n<p><code><br \/>\n  var rect=document.getElementById('test').<a target=_blank title='getBoundingClientRect' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Element\/getBoundingClientRect'>getBoundingClientRect<\/a>();<br \/>\n  document.getElementById('atend').style.position='absolute';<br \/>\n  document.getElementById('atend').style.left=eval(-rad + 20 + rect.left) + 'px';<br \/>\n  document.getElementById('atend').style.top=eval(38 + rect.top) + 'px';<br \/>\n  document.getElementById('atend').style.width=eval(2 * rad - 38) + 'px';<br \/>\n  document.getElementById('atend').style.height=eval(2 * rad - 38) + 'px';<br \/>\n  document.getElementById('atend').style.borderRadius=eval(2 * rad - 28) + 'px';<br \/>\n  if (document.getElementById('atend').innerHTML != '') { document.getElementById('atend').style.backgroundColor='#c0d0f0'; } \/\/'transparent';<br \/>\n<\/code><\/p>\n<p> &#8230; and ahead of this our user entered data needed for the Analogue Clock has an HTML (child) <b>iframe element<\/b> part &#8230;<\/p>\n<p><code><br \/>\n1&lt;span&gt;2&lt;\/span&gt;1234567891&lt;span&gt;0&lt;\/span&gt;1&lt;span&gt;1&lt;\/span&gt;<b>&lt;iframe scrolling=no frameborder=0 style='z-index:23;margin-left:127px;margin-top:130px;height:400px;' src=analogue_clock.htm#xbody&gt;&lt;\/iframe&gt;<\/b><br \/>\n<\/code> <\/p>\n<p> &#8230; that we figure, because it is HTML containing spaces in its non-innerHTML parts, is meant as content for that new &#8216;atend&#8217; HTML div element located in the middle of the circular text, and created via the <b>codeline<\/b> reached in this scenario &#8230;<\/p>\n<p><code><br \/>\nfunction justinnertextish(intx, within) {<br \/>\n  var sone=1, tagis='', iit=0, less=false, ioffset=0;<br \/>\n  outx=intx;<br \/>\n  it=[];<br \/>\n  if (intx.indexOf('&lt;\/') != -1) {<br \/>\n    outx=\"\";<br \/>\n    for (iit=0; iit&lt;intx.length; iit+=sone) {<br \/>\n      if (intx.substring(iit, eval(1 + iit)) == '&lt;') {<br \/>\n        tagis=intx.substring(iit).substring(1).split('&gt;')[0];<br \/>\n        less=false;<br \/>\n        if (tagis.indexOf(' ') != -1 || within) {<br \/>\n        less=true;<br \/>\n        <b>document.getElementById('atend').innerHTML='&lt;' + tagis + '&gt;' + intx.substring(eval(iit + 2 + tagis.length)).split('&gt;')[0] + '&gt;';<\/b><\/p>\n<p>   \/\/ etcetera etcetera etcetera<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p><a target=_blank title='Time' href='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html?radius=320.360&#038;text=1%3Cspan%3E2%3C%2Fspan%3E1234567891%3Cspan%3E0%3C%2Fspan%3E1%3Cspan%3E1%3C%2Fspan%3E%3Ciframe%20scrolling%3Dno%20frameborder%3D0%20style%3D%27z-index%3A23%3Bmargin-left%3A127px%3Bmargin-top%3A130px%3Bheight%3A400px%3B%27%20src%3Danalogue_clock.htm%23xbody%3E%3C%2Fiframe%3E'>Got the time?<\/a><\/p>\n<p><iframe scrolling=no style='width:100%;height:900px;' src='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html?radius=320.360&#038;text=1%3Cspan%3E2%3C%2Fspan%3E1234567891%3Cspan%3E0%3C%2Fspan%3E1%3Cspan%3E1%3C%2Fspan%3E%3Ciframe%20scrolling%3Dno%20frameborder%3D0%20style%3D%27z-index%3A23%3Bmargin-left%3A127px%3Bmargin-top%3A130px%3Bheight%3A400px%3B%27%20src%3Danalogue_clock.htm%23xbody%3E%3C%2Fiframe%3E'><\/iframe><\/p>\n<hr>\n<p id='ctept'>Previous relevant <a target=_blank title='Circular Text or Emojis Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emojis-primer-tutorial\/'>Circular Text or Emojis 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\/circular_text.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Circular Text or Emojis Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text_or_emoji.jpg\" title=\"Circular Text or Emojis Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Circular Text or Emojis Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve got a &#8220;proof of concept&#8221; tutorial for you today, because we got put onto an idea for something by <a target=_blank title='Usefulk link, thanks' href='https:\/\/appendto.com\/2016\/09\/how-to-make-circularcurved-text-with-javascript\/'>How to Make Circular\/Curved Text with JavaScript<\/a>, thanks.  We wanted to extend the logic of that &#8230;<\/p>\n<ul>\n<li>ascii codes (of characters) less than 256, text handling &#8230; to, now, be able to handle &#8230;<\/li>\n<li>emoji data (or that&#8217;s what we like to &#8220;nickname&#8221; it &#8230; sorry if this annoys, but it really concerns UTF-8 characters really<\/li>\n<\/ul>\n<p>We resisted the <a target=_blank title='Sushi Train Circuit Game Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/sushi-train-circuit-game-tutorial\/'>Sushi Train Circuit Game Tutorial<\/a> ideas, because it isn&#8217;t lunchtime, and opted to allow the user to enter their own text (including any emojis (available via Command-Control-Space menu here at Mac OS X) or via &amp;#[CodePoint]; HTML Entity (decimal or hexidecimal (CodePoint)) entries (where we&#8217;d like you to put &amp;amp; rather than just &amp; if you are going to do this, and if you want to do this, but need tips on how you might approach this, please consult our previous <a target=_blank title='Karaoke via YouTube API in Iframe Emoji Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/karaoke-via-youtube-api-in-iframe-emoji-tutorial\/'>Karaoke via YouTube API in Iframe Emoji Tutorial<\/a> where we often start at good ol&#8217; <a target=_blank title='emojipedia' href='http:\/\/emojipedia.org'>emojipedia<\/a>).<\/p>\n<p>Maybe there will be some sequels, but for the meantime you can examine the HTML and Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html_GETME\" title=\"circular_text.html\">circular_text.html<\/a> code (including more thank you links), that you can try for yourself at this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/circular_text.html\" title=\"Click picture\">live run<\/a> link.<\/p>\n<p>With that in mind, take a look at us creeping through the text characters you enter, and notice how an emoji will have two bytes in a row with ascii code greater than 255 &#8230;<\/p>\n<p><code><br \/>\n        var etxt=intxt.replace(\/\\&amp;amp\\;\/g,'&amp;').replace(\/\\;\\&amp;\\#\/g,',').split('&amp;#'); \/\/ intxt is your text<br \/>\n        var txt=[], zero=0; \/\/ changed elsewhere as well<br \/>\n        <br \/>\n        var one=1;<br \/>\n        for (kk=zero; kk&lt;etxt[k].length; kk+=one) {<br \/>\n         if (etxt[k].substring(kk, eval(1 + kk)).<a target=_blank title='charCodeAt information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/jsref_charcodeat.asp'>charCodeAt<\/a>(0) &gt; 255) { \/\/ emoji found<br \/>\n          txt.push(<a target=_blank title='String.fromCodePoint() information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/fromCodePoint'>String.fromCodePoint<\/a>(eval('' + etxt[k].substring(kk).charCodeAt(0)),eval('' + etxt[k].substring(kk).substring(1).charCodeAt(0))   ));<br \/>\n          one=2;<br \/>\n         } else {  \/\/ normal ascii text<br \/>\n          txt.push(etxt[k].substring(kk, eval(1 + kk)));<br \/>\n          one=1;<br \/>\n         }<br \/>\n        }<br \/>\n        }<br \/>\n        one=1;<br \/>\n        zero=0;<br \/>\n<\/code><\/p>\n<p>You can also see this play out at WordPress 4.1.1&#8217;s <a target=_blank title='Circular Text or Emojis Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/circular-text-or-emojis-primer-tutorial\/'>Circular Text or Emojis Primer Tutorial<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d42527' onclick='var dv=document.getElementById(\"d42527\"); 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='d42527' 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='#d42555' onclick='var dv=document.getElementById(\"d42555\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/iframe\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d42555' 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='#d42570' onclick='var dv=document.getElementById(\"d42570\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/genericization\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d42570' 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='#d42595' onclick='var dv=document.getElementById(\"d42595\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/onclick\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d42595' 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='#d42722' onclick='var dv=document.getElementById(\"d42722\"); 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='d42722' 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='#d42756' onclick='var dv=document.getElementById(\"d42756\"); 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='d42756' 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='#d42989' onclick='var dv=document.getElementById(\"d42989\"); 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='d42989' 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='#d58814' onclick='var dv=document.getElementById(\"d58814\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/formula\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58814' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We had occasion to revisit Circular Text or Emoji Periodic Table Quiz Tutorial and it set us to wondering if you can just feed a chemical equation or formula into the Google search engine and &#8230; find out good chemistry &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/chemistry-wonder-periodic-table-quiz-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[203,2712,1549,392,454,513,576,2780,652,4297,2805,997,1761,1022,1100,1111,1891,4298],"class_list":["post-58814","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-chemistry","tag-compound","tag-element","tag-equation","tag-formula","tag-google","tag-html","tag-interactive-entry","tag-javascript","tag-molecule","tag-periodic-table","tag-programming","tag-prompt","tag-quiz","tag-science","tag-search-engine","tag-user","tag-window-prompt"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58814"}],"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=58814"}],"version-history":[{"count":13,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58814\/revisions"}],"predecessor-version":[{"id":59126,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58814\/revisions\/59126"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}