{"id":54899,"date":"2022-02-14T03:01:11","date_gmt":"2022-02-13T17:01:11","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=54899"},"modified":"2022-02-13T11:14:57","modified_gmt":"2022-02-13T01:14:57","slug":"start-word-suggestions-for-wordle-sort-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/start-word-suggestions-for-wordle-sort-tutorial\/","title":{"rendered":"Start Word Suggestions for Wordle Sort Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Start Word Suggestions for Wordle Sort Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper_sort.jpg\" title=\"Start Word Suggestions for Wordle Sort Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Start Word Suggestions for Wordle Sort Tutorial<\/p><\/div>\n<p>The webpage created when you execute <a title='Start Word Suggestions for Wordle Iframe Tutorial' href='#swswit'>Start Word Suggestions for Wordle Iframe Tutorial<\/a>&#8216;s &#8220;Start Word Suggestions for <a target=_blank title=Wordle href='https:\/\/www.powerlanguage.co.uk\/wordle\/'>Wordle<\/a>&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\" title=\"Click picture\">web application<\/a> features a pretty common and traditional form of HTML table element display.<\/p>\n<p>This HTML <a target=_blank title='HTML table element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_table.asp'>table<\/a> element can &#8220;host&#8221; children and grandchildren and great grandchildren &#8230;<\/p>\n<ul>\n<li><a target=_blank title='HTML thead element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_thead.asp'>thead<\/a> (table header &#8220;child&#8221;)<\/li>\n<li><a target=_blank title='HTML tbody element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_tbody.asp'>tbody<\/a> (table body &#8220;child&#8221; element &#8230; some browsers create a tbody given the lack of a thead and the existence of element(s) below in the static HTML used)<\/li>\n<li><a target=_blank title='HTML tr element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_tr.asp'>tr<\/a> (table row &#8220;grandchild&#8221;)<\/li>\n<li><a target=_blank title='HTML th element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_th.asp'>th<\/a> (table header cell &#8220;great grandchild&#8221;)<\/li>\n<li><a target=_blank title='HTML td element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_td.asp'>td<\/a> (table body cell &#8220;great grandchild&#8221;)<\/li>\n<\/ul>\n<p> &#8230; and our table &#8220;static HTML&#8221; (ie. &#8220;the static <font size=1>initial<\/font> design HTML&#8221; before any Javascript DOM comes into play at or after the document.body &#8220;onload&#8221; event) involves &#8220;tr&#8221; and &#8220;th&#8221; and &#8220;td&#8221; elements above, and we become interested in massaging that <font size=1>(via Javascript DOM)<\/font> to host all &#8220;tr -&gt; th&#8221; elements within a derived &#8220;thead&#8221; and all &#8220;tr -&gt; td&#8221; elements within a derived &#8220;tbody&#8221; element, so that &#8220;sorting functionality&#8221; logic can consist of &#8230;<\/p>\n<ol>\n<li>add onclick logic for &#8220;th&#8221; elements &#8230; that can &#8230;<\/li>\n<li>affect the &#8220;tbody&#8221; innerHTML&#8217;s &#8220;tr -&gt; td&#8221; element content order &#8230;<\/li>\n<li>toggling between &#8220;from highest to lowest&#8221; and &#8220;from lowest to highest&#8221;<\/li>\n<\/ol>\n<p> &#8230; so that the scripting and styling code <font color=blue>now looks like<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n<font color=blue>$ondc=\" ondblclick=dictmaybe(this); \";<br \/>\nif (isset($_GET['nodouble']) || isset($_POST['nodouble'])) { $ondc=\"\";   }<\/font><br \/>\n<br \/>\n$hsc=\"&lt;head&gt;<br \/>\n&lt;title&gt;Start five letter word for Wordle - RJM Programming - February, 2022&lt;\/title&gt;<br \/>\n&lt;meta id='myviewport' name='viewport' content='width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes' &gt;<br \/>\n&lt;style&gt;<br \/>\n  td {<br \/>\n    text-align: center;<br \/>\n  }<br \/>\n<br \/>\n  td:nth-child(2n+1) {<br \/>\n    background-color: #f3f7fa;<br \/>\n  }<br \/>\n<br \/>\n  th:nth-child(2n+1) {<br \/>\n    background-color: #f3f7fa;<br \/>\n  }<br \/>\n<br \/> <br \/>\n  body {<br \/>\n    background-color: #f7f7f7;<br \/>\n  }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  var wois=null;<br \/>\n  <font color=blue>var sortrecs=[];<br \/>\n  var tables=[];<br \/>\n  var tbodies=[];<br \/>\n  var theads=[];<br \/>\n  var ths=[];<br \/>\n  var trs=[];<br \/>\n  var tds=[];<br \/>\n  var parti=0;<br \/>\n  var lessis=1;<br \/>\n  var tabih='';<br \/>\n  var woare=null;<br \/>\n  var adc=null;<\/font><br \/>\n<br \/> <br \/>\n  function onl() {<br \/>\n   if (window.self !== window.top) {<br \/>\n    document.body.innerHTML = ('' + document.body.innerHTML).replace(\/h1\/g, 'h2');<br \/>\n   }<br \/>\n   <font color=blue>makesortable();<\/font><br \/>\n  }<br \/>\n<br \/> <br \/>\n  <font color=blue>function gebtn() {<br \/>\n   theads=document.<a target=_blank title='Javascript DOM getElementsByTagName() method information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/met_document_getelementsbytagname.asp'>getElementsByTagName<\/a>('thead');<br \/>\n   tables=document.getElementsByTagName('table');<br \/>\n   trs=document.getElementsByTagName('tr');<br \/>\n   tds=document.getElementsByTagName('td');<br \/>\n   tbodies=document.getElementsByTagName('tbody');<br \/>\n   ths=document.getElementsByTagName('th');<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function makesortable() {<br \/>\n   var itd=0;<br \/>\n   var jtd=0;<br \/>\n   var recis='';<br \/>\n   var thisih='';<br \/>\n   var nonhead='';<br \/>\n   var origsrl=eval(sortrecs.length);<br \/>\n   gebtn();<br \/>\n   if (eval('' + theads.length) == 0 && eval('' + tbodies.length) &gt; 0 && eval('' + tables.length) &gt; 0 && eval('' + tds.length) &gt; 0 && eval('' + ths.length) &gt; 0 && eval('' + trs.length) &gt; 0) {<br \/>\n     if (tables[0].innerHTML.indexOf('&lt;tbody&gt;') != -1) {<br \/>\n      tables[0].innerHTML=tables[0].innerHTML.replace('&lt;tbody&gt;','').replace('&lt;\/tbody&gt;','').replace(trs[0].outerHTML, '&lt;thead&gt;' + trs[0].outerHTML + '&lt;\/thead&gt;');<br \/>\n      theads=document.getElementsByTagName('thead');<br \/>\n      tbodies=document.getElementsByTagName('tbody');<br \/>\n     }<br \/>\n   }<br \/>\n   if (eval('' + tbodies.length) == 0 && eval('' + tables.length) &gt; 0 && eval('' + tds.length) &gt; 0) {<br \/>\n     if (eval('' + ths.length) &gt; 0 && eval('' + trs.length) &gt; 0) {<br \/>\n       if (eval('' + theads.length) &gt; 0) {<br \/>\n         nonhead=tables[0].innerHTML.replace(theads[0].outerHTML,'');<br \/>\n       } else {<br \/>\n         nonhead=tables[0].innerHTML.replace(trs[0].outerHTML,'');<br \/>\n       }<br \/>\n       if (nonhead != '') {<br \/>\n         tables[0].innerHTML=tables[0].innerHTML.replace(nonhead, '&lt;tbody id=mytbody&gt;' + nonhead + '&lt;\/tbody&gt;');<br \/>\n         tbodies=document.getElementsByTagName('tbody');<br \/>\n       }<br \/>\n     }<br \/>\n   }<br \/>\n   if (eval('' + tbodies.length) &gt; 0 && eval('' + tables.length) &gt; 0 && eval('' + tds.length) &gt; 0) {<br \/>\n     if (eval('' + ths.length) &gt; 0 && eval('' + trs.length) &gt; 0) {<br \/>\n       recis='';<br \/>\n       for (itd=0; itd&lt;eval('' + tds.length); itd+=eval('' + ths.length)) {<br \/>\n         if (itd == 0) {<br \/>\n           for (jtd=0; jtd&lt;eval('' + ths.length); jtd++) {<br \/>\n            ths[jtd].title='Click this column ' + eval(1 + jtd) + ' to sort from highest to lowest.';<br \/>\n            ths[jtd].onclick = function() { sortcol(this);  };<br \/>\n           }<br \/>\n         }<br \/>\n         for (jtd=itd; jtd&lt;eval(itd + eval('' + ths.length)); jtd++) {<br \/>\n         thisih=tds[jtd].innerHTML;<br \/>\n         if (thisih.trim() != '') {<br \/>\n           if (thisih.trim().replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') == '') {<br \/>\n             recis+=('                    ' + thisih).slice(-20);<br \/>\n           } else {<br \/>\n             recis+=(thisih + '                    ').substring(0,20);<br \/>\n           }<br \/>\n         } else {<br \/>\n           recis+='                    ';<br \/>\n         }<br \/>\n         if (eval(eval(1 + jtd) % eval('' + ths.length)) == 0) {<br \/>\n           if (origsrl == 0) { sortrecs.push(recis); }<br \/>\n           recis='';<br \/>\n         }<br \/>\n         }<br \/>\n       }<br \/>\n     }<br \/>\n     if (origsrl == 0) {<br \/>\n       tabih=tables[0].innerHTML;<br \/>\n       tables[0].ondblclick = function() { tables[0].innerHTML=tabih; makesortable();  };<br \/>\n       tables[0].title='Double click me to restore to original sort order.';<br \/>\n     }<br \/>\n   }<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function compareparts(a, b) {<br \/>\n    if (a.substring(eval(20 * parti),eval(20 + eval(20 * parti))) == b.substring(eval(20 * parti),eval(20 + eval(20 * parti)))) {<br \/>\n      if (parti &gt; 0) {<br \/>\n        if (a.substring(0,eval(20 * parti)) &lt; b.substring(0,eval(20 * parti))) {<br \/>\n          return lessis;<br \/>\n        } else if (a.substring(0,eval(20 * parti)) &gt; b.substring(0,eval(20 * parti))) {<br \/>\n          return -lessis;<br \/>\n        }<br \/>\n      }<br \/>\n      return 0;<br \/>\n    }<br \/>\n    if (a.substring(eval(20 * parti),eval(20 + eval(20 * parti))) &lt; b.substring(eval(20 * parti),eval(20 + eval(20 * parti)))) { return lessis; }<br \/>\n    return -lessis;<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function dictmaybe(intdo) {<br \/>\n    if (('' + intdo.innerHTML) != '' && ('' + intdo.innerHTML).replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') != '') {<br \/>\n     if (woare) {  if (!woare.closed) {  woare.close(); woare=null;  }  }<br \/>\n     woare=window.open('\/\/www.thefreedictionary.com\/' + encodeURIComponent(intdo.innerHTML), '_blank', 'top=100,left=' + eval(eval('' + screen.width) \/ 2) + ',width=' + eval(eval('' + screen.width) \/ 2) + ',height=600');<br \/>\n    }<br \/>\n  }<br \/>\n<br \/> <br \/>\n  function sortcol(tho) {<br \/>\n   var ij=0;<br \/>\n   var kl=0;<br \/>\n   var tb='';<br \/>\n   parti=0;<br \/>\n   if (('' + tho.title).indexOf('Click this column ') == 0 && ('' + tho.title).indexOf(' to sort from ') != -1) {<br \/>\n     parti=eval(-1 + eval(('' + tho.title).split('Click this column ')[1].split(' ')[0]));<br \/>\n     if (eval('' + tbodies.length) &gt; 0 && eval('' + tables.length) &gt; 0 && eval('' + tds.length) &gt; 0) {<br \/>\n       if (('' + tho.title).indexOf(' highest to lowest') != -1) {<br \/>\n         sortrecs.sort(compareparts);<br \/>\n         for (ij=0; ij&lt;eval('' + ths.length); ij++) {<br \/>\n           ths[ij].title=ths[ij].title.replace(' highest to lowest', ' lowest to highest');<br \/>\n         }<br \/>\n         tb='';<br \/>\n         for (kl=0; kl&lt;eval('' + sortrecs.length); kl++) {<br \/>\n           tb+='&lt;tr&gt;&lt;\/tr&gt;';<br \/>\n           for (ij=0; ij&lt;eval('' + ths.length); ij++) {<br \/>\n             tb=tb.replace('&lt;\/tr&gt;', '&lt;td\" . $ondc . \"&gt;' + sortrecs[kl].substring(eval(20 * ij),eval(20 + eval(20 * ij))).trim() + '&lt;\/td&gt;&lt;\/tr&gt;');<br \/>\n           }<br \/>\n           tb=tb.replace('&lt;\/tr&gt;', '&lt;\/TR&gt;');<br \/>\n         }<br \/>\n         lessis=-lessis;<br \/>\n       } else {<br \/>\n         sortrecs.sort(compareparts);<br \/>\n         for (ij=0; ij&lt;eval('' + ths.length); ij++) {<br \/>\n           ths[ij].title=ths[ij].title.replace(' lowest to highest', ' highest to lowest');<br \/>\n         }<br \/>\n         tb='';<br \/>\n         for (kl=0; kl&lt;eval('' + sortrecs.length); kl++) {<br \/>\n           tb+='&lt;tr&gt;&lt;\/tr&gt;';<br \/>\n           for (ij=0; ij&lt;eval('' + ths.length); ij++) {<br \/>\n             tb=tb.replace('&lt;\/tr&gt;', '&lt;td\" . $ondc . \"&gt;' + sortrecs[kl].substring(eval(20 * ij),eval(20 + eval(20 * ij))).trim() + '&lt;\/td&gt;&lt;\/tr&gt;');<br \/>\n           }<br \/>\n           tb=tb.replace('&lt;\/tr&gt;', '&lt;\/TR&gt;');<br \/>\n         }<br \/>\n         lessis=-lessis;<br \/>\n       }<br \/>\n       tbodies[0].innerHTML=tb.replace('&lt;\/tr&gt;', '&lt;\/TR&gt;');<br \/>\n     }<br \/>\n   }<br \/>\n  }<\/font><br \/>\n<br \/>\n  function mixitup() {<br \/>\n   var others=prompt('Space separate the word(s) \\\"sort\\\" to sort for Weirdness and\/or \\\"unique\\\" for five letter words with no repeated letters.   Optionally precede by that number of five letter word suggestions to create for use with Wordle, followed by a space character.', '');<br \/>\n   var clickthis='';<br \/>\n   if (others == null) { others=''; }<br \/>\n   others=others.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'');<br \/>\n   others=others.toLowerCase().replace('sort',' sort').replace('uniqu',' uniqu');<br \/>\n   if (others.trim() != '') {<br \/>\n     var aothers=others.trim().split(' ');<br \/>\n     if (aothers[0].replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') == '') {<br \/>\n        document.getElementById('defopt').value='-' + aothers[0];<br \/>\n        document.getElementById('defopt').innerHTML=aothers[0];<br \/>\n        document.getElementById('sugnum').value='-' + aothers[0];<br \/>\n        others=others.replace(aothers[0],'').trim();<br \/>\n        clickthis='mysub';<br \/>\n     }<br \/>\n   }<br \/>\n   if (others.trim() != '') {<br \/>\n     var sv=document.getElementById('sugnum').value;<br \/>\n     document.getElementById('myform').innerHTML+='&lt;input type=hidden name=others value=\\\"' + others + '\\\"&gt;&lt;\/input&gt;';<br \/>\n     document.getElementById('sugnum').value=sv;<br \/>\n   }<br \/>\n   if (clickthis != '') {  document.getElementById(clickthis).click();  }<br \/>\n  }<br \/>\n<br \/> <br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;\";<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; that augments that &#8220;th&#8221; &#8220;onclick&#8221; event logic with some non-mobile &#8220;ondblclick&#8221; event logic &#8230;<\/p>\n<ul>\n<li>for &#8220;table&#8221; that unscrambles any sorting &#8230;<\/li>\n<li>for &#8220;td&#8221; cells whose content is not numeric, look up <a target=_blank title='The Free Dictionary' href='\/\/www.thefreedictionary.com'>The Free Dictionary<\/a>, thanks, to try to explain word meanings<\/li>\n<\/ul>\n<p> &#8230; for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php---GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php---GETME\" title=\"start_word_for_wordle_helper.php\">start_word_for_wordle_helper.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\" title=\"Click picture\">live run<\/a> link, <a href='#myswh' title='Below'>or below<\/a>, &#8220;Start Word for Wordle&#8221; web application.<\/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\/start-word-suggestions-for-wordle-sort-tutorial\/'>Start Word Suggestions for Wordle Sort Tutorial<\/a>.<\/p-->\n<hr>\n<p id='swswit'>Previous relevant <a target=_blank title='Start Word Suggestions for Wordle Iframe Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/start-word-suggestions-for-wordle-iframe-tutorial\/'>Start Word Suggestions for Wordle Iframe Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Start Word Suggestions for Wordle Iframe Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper_iframe.jpg\" title=\"Start Word Suggestions for Wordle Iframe Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Start Word Suggestions for Wordle Iframe Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Start Word Suggestions for Wordle Styling and Scripting Tutorial' href='#swswsst'>Start Word Suggestions for Wordle Styling and Scripting Tutorial<\/a>&#8216;s presentation used a hashtag navigation link, &#8220;<a href='#myswh' title='Below'>or below<\/a>&#8220;, to take the user to an HTML iframe hosted execution of our current web application of interest.   Sometimes in such a scenario, you might be dealing with a vastly reduced width and\/or height to work with, and find your presentation to this iframe appears a bit too wide or too high.  And so, today, we outline an idea or two about how to handle that.<\/p>\n<ol>\n<li>decide on a strategy for &#8220;iframe&#8221; modus operandi CSS styling improvement or HTML design improvement or Javascript DOM dynamic styling improvement &#8230; we&#8217;ve decided, today &#8230;<\/li>\n<li>for &#8220;iframe&#8221; modus operandi we want to reduce width by turning the &#8220;h1&#8221; element into an &#8220;h2&#8221; element &#8230; which amounts to an <i>HTML design improvement<\/i> implemented via a Javascript DOM action conduit, as per &#8230;<\/li>\n<li>decide on an intervention point for that <i>Javascript DOM action conduit<\/i> &#8230; you guessed it &#8230; document.body onload event <font color=blue>as the webpage loads<\/font> &#8230;<br \/>\n&lt;?php<br \/>\n<code><br \/>\necho \"&lt;html&gt;\" . $hsc . \"&lt;body<font color=blue> onload=onl();<\/font>&gt;&lt;h1&gt;&lt;span&gt;Start five letter word for &lt;a target=_blank href='\/\/www.powerlanguage.co.uk\/wordle\/'&gt;Wordle&lt;\/a&gt; ... &lt;\/span&gt;&lt;input onclick=mixitup(); title='Allow for Unique Letters, Weirdness Sorting' type=button style=display:inline-block; value='via '&gt;&lt;\/input&gt;&lt;\/span&gt;&lt;form id=myform style=display:inline-block; action=.\/start_word_for_wordle_helper.php method=POST&gt;&lt;input id=mysub type=submit value=Submit style=display:none;&gt;&lt;\/input&gt;&lt;select style=display:inline-block; id=sugnum name=sugnum onchange=document.getElementById('mysub').click();&gt;&lt;option id=defopt value=-\" . $sugnum . \"&gt;\" . $sugnum . \"&lt;\/option&gt;&lt;option value=1&gt;1&lt;\/option&gt;&lt;option value=2&gt;2&lt;\/option&gt;&lt;option value=3&gt;3&lt;\/option&gt;&lt;option value=4&gt;4&lt;\/option&gt;&lt;option value=5&gt;5&lt;\/option&gt;&lt;option value=6&gt;6&lt;\/option&gt;&lt;option value=7&gt;7&lt;\/option&gt;&lt;option value=8&gt;8&lt;\/option&gt;&lt;option value=9&gt;9&lt;\/option&gt;&lt;option value=10&gt;10&lt;\/option&gt;&lt;option value=20&gt;20&lt;\/option&gt;&lt;option value=25&gt;25&lt;\/option&gt;&lt;option value=50&gt;50&lt;\/option&gt;&lt;option value=100&gt;100&lt;\/option&gt;&lt;\/select&gt;&lt;span&gt; suggestions ...&lt;\/span&gt;&lt;\/h1&gt;&lt;h3&gt;RJM Programming ... February, 2022&lt;\/h3&gt;&lt;h4&gt;Suggestions below (bigger associated number, the weirder is the suggestion) ...&lt;\/h4&gt;&lt;br&gt;\" . $tablebit . \"&lt;\/body&gt;&lt;\/html&gt;\";<br \/>\n<\/code><br \/>\n?&gt;<br \/>\n &#8230; then &#8230;<\/li>\n<li>write the new Javascript document.body onload event logic &#8230;<br \/>\n&lt;?php echo &#8221;<br \/>\n<code><br \/>\n  function onl() {<br \/>\n   if (window.self !== window.top) {<br \/>\n    document.body.innerHTML = ('' + document.body.innerHTML).replace(\/h1\/g, 'h2');<br \/>\n   }<br \/>\n  }<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<br \/>\n &#8230; a total &#8220;document.body.innerHTML&#8221; (content) solution working here (but is not always a good solution) to change the &#8220;type&#8221; of an element\n<\/li>\n<\/ol>\n<p> &#8230; representing a &#8220;hosting mode of use&#8221; style variation with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php--GETME\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php--GETME\" title=\"start_word_for_wordle_helper.php\">start_word_for_wordle_helper.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\" title=\"Click picture\">live run<\/a> link, <a href='#myswh' title='Below'>or below<\/a>, web application!<\/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\/start-word-suggestions-for-wordle-iframe-tutorial\/'>Start Word Suggestions for Wordle Iframe Tutorial<\/a>.<\/p-->\n<hr>\n<p id='swswsst'>Previous relevant <a target=_blank title='Start Word Suggestions for Wordle Styling and Scripting Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/start-word-suggestions-for-wordle-styling-and-scripting-tutorial\/'>Start Word Suggestions for Wordle Styling and Scripting Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Start Word Suggestions for Wordle Styling and Scripting Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.gif\" title=\"Start Word Suggestions for Wordle Styling and Scripting Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Start Word Suggestions for Wordle Styling and Scripting Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Start Word Suggestions for Wordle Primer Tutorial' href='#swswpt'>Start Word Suggestions for Wordle Primer Tutorial<\/a> proof of concept &#8220;Start Five Letter Word for <a target=_blank title=Wordle href='https:\/\/www.powerlanguage.co.uk\/wordle\/'>Wordle<\/a> Suggester&#8221; web application managed to create a workable webpage that did not need a <a target=_blank title='HTML head element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_head.asp'>&#8220;head&#8221;<\/a> element.  What are you missing with no &#8220;head&#8221; element?  Primarily &#8230;<\/p>\n<ul>\n<li>scripting (usually <a target=_blank title='HTML script element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_script.asp'>via<\/a> Javascript)<\/li>\n<li>styling (<a target=_blank title='HTML style element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_style.asp'>via<\/a> CSS)<\/li>\n<\/ul>\n<p> &#8230; and, perhaps a webpage title element, and, perhaps <a target=_blank title='HTML meta element information from W3schools' href='https:\/\/www.w3schools.com\/tags\/tag_meta.asp'>&#8220;meta&#8221;<\/a> elements like <a target=_blank title='HTML responsive design information from W3schools' href='https:\/\/www.w3schools.com\/css\/css_rwd_viewport.asp'>&#8220;meta viewport&#8221;<\/a> elements that help with mobile device display (improved visibility, for us).<\/p>\n<p>Within the PHP code we introduced some of all these improvements via &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$hsc=\"&lt;head&gt;<br \/>\n&lt;title&gt;Start five letter word for Wordle - RJM Programming - February, 2022&lt;\/title&gt;<br \/>\n&lt;meta id='myviewport' name='viewport' content='width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes' &gt;<br \/>\n&lt;style&gt;<br \/>\n  td {<br \/>\n    text-align: center;<br \/>\n  }<br \/>\n<br \/>\n  td:nth-child(2n+1) {<br \/>\n    background-color: #f3f7fa;<br \/>\n  }<br \/>\n<br \/>\n  th:nth-child(2n+1) {<br \/>\n    background-color: #f3f7fa;<br \/>\n  }<br \/>\n<br \/> <br \/>\n  body {<br \/>\n    background-color: #f7f7f7;<br \/>\n  }<br \/>\n&lt;\/style&gt;<br \/>\n&lt;script type='text\/javascript'&gt;<br \/>\n  var wois=null;<br \/>\n  function mixitup() {<br \/>\n   var others=prompt('Space separate the word(s) \\\"sort\\\" to sort for Weirdness and\/or \\\"unique\\\" for five letter words with no repeated letters.   Optionally precede by that number of five letter word suggestions to create for use with Wordle, followed by a space character.', '');<br \/>\n   var clickthis='';<br \/>\n   if (others == null) { others=''; }<br \/>\n<br \/>   others=others.replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'').replace(String.fromCharCode(34),'');<br \/>\n   others=others.toLowerCase().replace('sort',' sort').replace('uniqu',' uniqu');<br \/>\n   if (others.trim() != '') {<br \/>\n     var aothers=others.trim().split(' ');<br \/>\n     if (aothers[0].replace(\/0\/g,'').replace(\/1\/g,'').replace(\/2\/g,'').replace(\/3\/g,'').replace(\/4\/g,'').replace(\/5\/g,'').replace(\/6\/g,'').replace(\/7\/g,'').replace(\/8\/g,'').replace(\/9\/g,'') == '') {<br \/>\n        document.getElementById('defopt').value='-' + aothers[0];<br \/>\n        document.getElementById('defopt').innerHTML=aothers[0];<br \/>\n        document.getElementById('sugnum').value='-' + aothers[0];<br \/>\n        others=others.replace(aothers[0],'').trim();<br \/>\n        clickthis='mysub';<br \/>\n     }<br \/>\n   }<br \/>\n   if (others.trim() != '') {<br \/>\n     var sv=document.getElementById('sugnum').value;<br \/>\n     document.getElementById('myform').innerHTML+='&lt;input type=hidden name=others value=\\\"' + others + '\\\"&gt;&lt;\/input&gt;';<br \/>\n     document.getElementById('sugnum').value=sv;<br \/>\n   }<br \/>\n   if (clickthis != '') {  document.getElementById(clickthis).click();  }<br \/>\n  }<br \/>\n<br \/> <br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;\";<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p>It allows us to offer &#8220;sort&#8221; (via word weirdness) and &#8220;uniquify&#8221; (to enforce unique letter sets per five letter word) additional functionality.  We hope you try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php-GETME\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php-GETME\" title=\"start_word_for_wordle_helper.php\">start_word_for_wordle_helper.php<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\" title=\"Click picture\">live run<\/a> link, <a href='#myswh' title='Below'>or below<\/a>, to try out these improvements.<\/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\/start-word-suggestions-for-wordle-styling-and-scripting-tutorial\/'>Start Word Suggestions for Wordle Styling and Scripting Tutorial<\/a>.<\/p-->\n<hr>\n<p id='swswpt'>Previous relevant <a target=_blank title='Start Word Suggestions for Wordle Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/start-word-suggestions-for-wordle-primer-tutorial\/'>Start Word Suggestions for Wordle 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\/PHP\/start_word_for_wordle_helper.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Start Word Suggestions for Wordle Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.jpg\" title=\"Start Word Suggestions for Wordle Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">Start Word Suggestions for Wordle Primer Tutorial<\/p><\/div>\n<p>A new word game is an interesting phenomenon.  Are you a regular <a target=_blank title=Wordle href='https:\/\/www.powerlanguage.co.uk\/wordle\/'>&#8220;Wordle&#8221;<\/a> player?  We tried it the other day, and see why it&#8217;s addictive.  But it seems to us, a lot relies on that first five letter word guess you make.<\/p>\n<p>And so we decided to try to help out, at least in English, by accessing the macOS and Linux dictionary resources, and add in a &#8220;weirdness score&#8221;, the scoring for which we adopt a &#8220;Scrabble stance&#8221;.   Interested?  Try <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\">start_word_for_wordle_helper.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php\">live run<\/a>, or below &#8230;<\/p>\n<p><iframe id=myswh src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/start_word_for_wordle_helper.php?others=10sortunique\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54864' onclick='var dv=document.getElementById(\"d54864\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/word\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54864' 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='#d54868' onclick='var dv=document.getElementById(\"d54868\"); 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='d54868' 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='#d54880' onclick='var dv=document.getElementById(\"d54880\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/type\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54880' 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='#d54899' onclick='var dv=document.getElementById(\"d54899\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/sort\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54899' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The webpage created when you execute Start Word Suggestions for Wordle Iframe Tutorial&#8216;s &#8220;Start Word Suggestions for Wordle&#8221; web application features a pretty common and traditional form of HTML table element display. This HTML table element can &#8220;host&#8221; children and &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/start-word-suggestions-for-wordle-sort-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,15,37],"tags":[155,211,281,326,2848,354,359,400,2212,587,652,776,861,1666,870,932,997,1105,1106,1173,2449,1209,1212,1238,3628,3907,3489,3629,2167,3906,1319,1373,1452,1453,3905],"class_list":["post-54899","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-body","tag-click","tag-css","tag-dictionary","tag-document-getelementsbytagname","tag-dom","tag-double-click","tag-event","tag-head","tag-iframe","tag-javascript","tag-meta","tag-onclick","tag-ondblclick","tag-onload","tag-php","tag-programming","tag-script","tag-scripting","tag-sort","tag-sorting","tag-style","tag-styling","tag-table","tag-tbody","tag-td","tag-th","tag-thead","tag-title","tag-tr","tag-tutorial","tag-viewport","tag-word","tag-word-game","tag-wordle"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54899"}],"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=54899"}],"version-history":[{"count":18,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54899\/revisions"}],"predecessor-version":[{"id":54917,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54899\/revisions\/54917"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=54899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=54899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=54899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}