{"id":68329,"date":"2025-05-13T03:01:00","date_gmt":"2025-05-12T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=68329"},"modified":"2025-05-13T07:26:37","modified_gmt":"2025-05-12T21:26:37","slug":"select-multiple-webpage-palette-popup-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/select-multiple-webpage-palette-popup-tutorial\/","title":{"rendered":"Select Multiple Webpage Palette Popup Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Select Multiple Webpage Palette Popup Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette_popup.gif\" title=\"Select Multiple Webpage Palette Popup Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Select Multiple Webpage Palette Popup Tutorial<\/p><\/div>\n<p>Regarding yesterday&#8217;s <a title='Select Multiple Webpage Palette Primer Tutorial' href='#smwppt'>Select Multiple Webpage Palette Primer Tutorial<\/a> &#8230;<\/p>\n<ul>\n<li>you start with an outlandish premise &#8230;<\/li>\n<li>it stays &#8220;outlandish&#8221; select (dropdown) element wise on non-mobile &#8230; but &#8230;<\/li>\n<li>catering for mobile &#8230;<\/li>\n<li>you are forced to encase it in a hosting div element (with the onmousedown and ontouchdown precursor events to onclick)<\/li>\n<\/ul>\n<p> &#8230; all contributing to getting us to a point, today, we can say we&#8217;ve added a layer of <font size=1>(useful, extra)<\/font> functionality, by &#8230;<\/p>\n<ul>\n<li>no longer asking for user interactive input via a Javascript prompt window &#8230; but, instead, like with <a target=\"_blank\" href='https:\/\/www.rjmprogramming.com.au\/ITblog\/background-image-foreground-content-tutorial\/' title='Background Image Foreground Content Tutorial' rel=\"noopener\">Background Image Foreground Content Tutorial<\/a> &#8230; we &#8230;<\/li>\n<li>ask for user interactive input via a window.open (ie. popup) &#8220;here&#8217;s looking at you, kid&#8221; window.opener incarnation guise of <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html--GETME\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html--GETME\" rel=\"noopener\">select_palette.html<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html\" rel=\"noopener\">web application<\/a>  &#8230; just consisting of &#8230;<\/li>\n<li>one <a target=\"_blank\" title='HTML textarea tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_textarea.asp' rel=\"noopener\">textarea<\/a> element &#8230;\n<ol>\n<li>still capable of ~~ delimitation as with the Javascript prompt window thinking &#8230; but also now &#8230;<\/li>\n<li>harnessing the talents of a textarea line feed delimitation within it&#8217;s value attribute<\/li>\n<\/ol>\n<p> &#8230; able to extend functionality towards decent &#8230;<\/li>\n<li>speech bubble <font size=1>feeling<\/font> thoughts (so far, just) &#8230; because &#8230;<\/li>\n<li>it opens up the idea that the div element <a target=\"_blank\" title='HTML innerHTML property' href='https:\/\/www.w3schools.com\/jsref\/prop_html_innerhtml.asp' rel=\"noopener\">innerHTML<\/a> attribute can be the SVG we had previously been supplying as background HTML\/CSS (via Javascript DOM) data<\/li>\n<\/ul>\n<p>Cute, huh?! <font size=2>(ahead of the &#8220;Speech Bubble styling&#8221; niceties making it <i>really cute<\/i>, yet, for us <\/font><font size=1>&#8230; but who knows what <i>you<\/i> can achieve on the &#8220;cute styling front&#8221;?!<\/font><font size=2>)<\/font>.<\/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\/select-multiple-webpage-palette-popup-tutorial\/' rel=\"noopener\">Select Multiple Webpage Palette Popup Tutorial<\/a>.<\/p-->\n<hr>\n<p id='smwppt'>Previous relevant <a target=\"_blank\" title='Select Multiple Webpage Palette Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/select-multiple-webpage-palette-primer-tutorial\/' rel=\"noopener\">Select Multiple Webpage Palette 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\/select_palette.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Select Multiple Webpage Palette Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.gif\" title=\"Select Multiple Webpage Palette Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Select Multiple Webpage Palette Primer Tutorial<\/p><\/div>\n<p>In the world of web applications, there are often many ways to approach any given requirement.  Like with yesterday&#8217;s <a title='Select Multiple Mobile Background Image Tutorial' href='#smmbit'>Select Multiple Mobile Background Image Tutorial<\/a>, today&#8217;s &#8220;albeit a bit out there idea&#8221; is to &#8230;<\/p>\n<ul>\n<li>offer a select (multiple attribute) &#8220;dropdown&#8221; HTML element &#8230;<\/li>\n<li>as a webpage covering &#8230;<\/li>\n<li>template or palette &#8230; where the user &#8230;<\/li>\n<li>writes user defined lines of words created<\/li>\n<\/ul>\n<p> &#8230; onto.  Pretty simple idea for a &#8220;<a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html_GETME\" rel=\"noopener\">first<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html-GETME\" rel=\"noopener\">then<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html-GETME\" rel=\"noopener\">second<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/select_palette.html\" rel=\"noopener\">draft<\/a>&#8220;!  But maybe not the first idea to spring to mind regarding making such an idea happen?!<\/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\/select-multiple-webpage-palette-primer-tutorial\/' rel=\"noopener\">Select Multiple Webpage Palette Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='smmbit'>Previous relevant <a target=\"_blank\" title='Select Multiple Mobile Background Image Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/select-multiple-mobile-background-image-tutorial\/' rel=\"noopener\">Select Multiple Mobile Background Image 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Select Multiple Mobile Background Image Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_revisit.gif\" title=\"Select Multiple Mobile Background Image Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Select Multiple Mobile Background Image Tutorial<\/p><\/div>\n<p>We had occasion to revisit <a title='Window LocalStorage Client Versus Server Map Tutorial' href='#wlscvsmt'>Window LocalStorage Client Versus Server Map Tutorial<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" rel=\"noopener\">web application<\/a> today <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------------GETME\" rel=\"noopener\">changed this way<\/a> to end up with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------------GETME\" rel=\"noopener\">wls_vs_php.htm<\/a>, on an iPad, and saw how initially lacking was the advice on how to work the Capital City to Country quiz.  The reason, primarily, in our view, is that on mobile platforms an element such as &#8230;<\/p>\n<p><code><br \/>\n&lt;select class=dglow onclick=\" console.log('67234');  noif(); \" title='Please select Capital(s) below to get Countries Report ...' onfocusout=\" document.getElementById('myrepsb').className='dglow'; tablemode = ''; nothere=true; updatecountries(null);\" style='width:300px;margin-top:0px;margin-left:0px;vertical-align:top;height:100vh;background-color:lightblue;' id=scapitals multiple&gt;<br \/>\n\/\/ innard options \/\/<br \/>\n&lt;\/select&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; you just see words to the effect &#8230;<\/p>\n<blockquote><p>\n0 items &#8230;\n<\/p><\/blockquote>\n<p> &#8230; but we&#8217;d see more use for this select element &#8220;opened up&#8221; on initialization.  As we read, and believed, via <a target=\"_blank\" title='Useful link' href='https:\/\/medium.com\/browserquirks\/browserquirk-programmatically-opening-a-select-box-4ca745a8468f' rel=\"noopener\">this useful link<\/a>, thanks, this &#8220;programmatical click on mobile platforms&#8221; to open up such a select element is not easy.  So we decided to go down the route of &#8230;<\/p>\n<ul>\n<li>to a select multiple element &#8230;<\/li>\n<li>on mobile &#8230;<\/li>\n<li>background image &#8230; <\/li>\n<li>at top right &#8230;<\/li>\n<li>that is <i>wording advice &#8220;Click\/tap me&#8221;<\/i> &#8230;<\/li>\n<li>when first encountered<\/li>\n<\/ul>\n<p> &#8230; and we came up with the document.body <i>onload<\/i> event call &#8220;new Javascript code snippet&#8221; &#8230;<\/p>\n<p><code><br \/>\n  if (document.URL.indexOf('?') == -1) {<br \/>\n   if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n    document.getElementById('scapitals').click(); \/\/ this is just wishful thinking, but no error is caused, and you never know?<br \/>\n    document.getElementById('scapitals').style.background=\"url(\\\"data:image\/svg+xml;base64,\" + window.btoa(\"&lt;svg xmlns='http:\/\/www.w3.org\/2000\/svg' width='126' height='48' viewport='0 0 100 100' style='border-radius:15px;background-color:rgba(0,0,255,0.3);fill:black;font-family:Verdana;font-size:17px;'&gt;&lt;text x='5%' y='60%'&gt;Click\/tap me&lt;\/text&gt;&lt;\/svg&gt;\") + \"\\\") no-repeat top right\";<br \/>\n   }<br \/>\n  }<br \/>\n<\/code><\/p>\n<p><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_revisit.gif\" rel=\"noopener\">Next best approach<\/a>, we&#8217;d say?!<\/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\/select-size-mobile-background-image-tutorial\/' rel=\"noopener\">Select Size Mobile Background Image Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wlscvsmt'>Previous relevant <a target=\"_blank\" title='Window LocalStorage Client Versus Server Map Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-localstorage-client-versus-server-map-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server Map 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window LocalStorage Client Versus Server Map Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_map.jpg\" title=\"Window LocalStorage Client Versus Server Map Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window LocalStorage Client Versus Server Map Tutorial<\/p><\/div>\n<p>Get a good map, and a goodly number of times you&#8217;ll want a map of smaller or larger scale than the one you have.  Murphy&#8217;s Law?  This is probably why in the wonderful woooooooorrrrrrrrlllllld of <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.' rel=\"noopener\">Google Charts<\/a> they have included &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/geochart' title='Google Geo Charts' rel=\"noopener\">Geo Chart<\/a> topographic map of the world or of regions<\/li>\n<li><a target=\"_blank\" href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/map' title='Google Map Charts' rel=\"noopener\">Map Chart<\/a> terrestrial\/satellite map of your group of markers at a zoom level of your choosing<\/li>\n<\/ul>\n<p> &#8230; and hope you can see that the latter can save the day for a Short Distance Trip <font size=1>(corner shop, anyone?!)<\/font>.<\/p>\n<p>So we&#8217;ve added onto yesterday&#8217;s <a title='Window LocalStorage Client Versus Server Timeline Tutorial' href='#wlscvstt'>Window LocalStorage Client Versus Server Timeline Tutorial<\/a> progress a new toggling button to view a scenario in either <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.' rel=\"noopener\">Google Chart<\/a> scenario above.<\/p>\n<p>You can see this integration work with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html----------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">our changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html----------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link supervising <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/geo_chart.php---------------------GETME\" title=\"geo_chart.php\" rel=\"noopener\">a tweaked<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/geo_chart.php---------------------GETME\" title=\"geo_chart.php\" rel=\"noopener\">geo_chart.php<\/a> Geo Chart interfacer.<\/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\/window-localstorage-client-versus-server-map-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server Map Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wlscvstt'>Previous relevant <a target=\"_blank\" title='Window LocalStorage Client Versus Server Timeline Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-localstorage-client-versus-server-timeline-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server Timeline 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window LocalStorage Client Versus Server Timeline Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_timeline.jpg\" title=\"Window LocalStorage Client Versus Server Timeline Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window LocalStorage Client Versus Server Timeline Tutorial<\/p><\/div>\n<p>Up to yesterday&#8217;s <a title='Window LocalStorage Client Versus Server User Tutorial' href='#wlscvsut'>Window LocalStorage Client Versus Server User Tutorial<\/a>&#8216;s progress, our Capital City Find Matching Country Report web application project was all about &#8230;<\/p>\n<ul>\n<li>where <font size=1>(and capital of &#8220;what&#8221;)<\/font> &#8230; but we often seek out a way to add into the mix that 4th dimension &#8230;<\/li>\n<li>when (ie. time)<\/li>\n<\/ul>\n<p> &#8230; and regarding the current project, a &#8230;<\/li>\n<ul>\n<li>where &#8220;map&#8221; &#8230; can interface with a &#8230;<\/li>\n<li>when &#8220;Trip Plan Itinerary&#8221;<\/li>\n<\/ul>\n<p> &#8230; and for this purpose, we&#8217;re going to interface to the excellent <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.' rel=\"noopener\">Google Charts<\/a> <a target=\"_blank\" href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/annotatedtimeline' title='Annotated Timeline Chart' rel=\"noopener\">Annotated Timeline Chart<\/a>, thanks, because it combines links of &#8220;time&#8221; to &#8220;user annotations&#8221; in a timeline way, that similar way you might describe the qualities of a Trip, even before you&#8217;ve gone on that trip.  We&#8217;ve also added it so that an unordered places list can be turned into a Trip Plan Itinerary at the click\/touch of a new map &#128506; &amp;#128506; emoji button.<\/p>\n<p>Again, see how these timeline amendments were achieved with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">our changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link and  <a target=\"_blank\" title='annotatedtimeline_chart.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/AnnotatedTimelineChart\/annotatedtimeline_chart.php------GETME' rel=\"noopener\">annotatedtimeline_chart.php<\/a> which <a target=\"_blank\" title='annotatedtimeline_chart.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/AnnotatedTimelineChart\/annotatedtimeline_chart.php------GETME' rel=\"noopener\">changed quite a lot<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/new-window-localstorage-client-versus-server-timeline-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server Timeline Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wlscvsut'>Previous relevant <a target=\"_blank\" title='Window LocalStorage Client Versus Server User Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-localstorage-client-versus-server-user-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server User 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window LocalStorage Client Versus Server User Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_user.jpg\" title=\"Window LocalStorage Client Versus Server User Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window LocalStorage Client Versus Server User Tutorial<\/p><\/div>\n<p>The inherent weakness with our current Capital City Find Matching Country Report web application project, to our minds, was that places of interest are not restricted to the Capital Cities of Countries, especially when &#8220;Trip Planning&#8221;.   On the other hand, it would be impossible to cater for every &#8220;place&#8221; in the world.  That is far too subjective for good web application applicability.  What would be good though, is to allow in user defined &#8230;<\/p>\n<p><code><br \/>\nPlace name, Country name<br \/>\n<\/code><\/p>\n<p> &#8230; terms, the definitions of interest to a user.  We can ask this &#8230;<\/p>\n<ul>\n<li>flagged by the click\/touch of an emoji button &#8230; and &#8230;<\/li>\n<li>the interactive entry presented via a Javascript <a target=\"_blank\" title='Javascript prompt window information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp' rel=\"noopener\">prompt<\/a> window<\/li>\n<\/ul>\n<p>.  When thinking of data applicable to an individual, then that can be catered for by recording it in <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp' rel=\"noopener\">localStorage<\/a> where it will be recalled on the next execution of that web application in the same web browser.<\/p>\n<p>This, along with a Colour Wheel of the &#8220;nearest TimeZone place&#8221; onto the existing logic of yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Order Tutorial' href='#wsscvsot'>Window SessionStorage Client Versus Server Order Tutorial<\/a> progress could make for a more useful and practical tool for those Trip Planners out there!<\/p>\n<p>See how this was achieved with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">our changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link.<\/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\/window-sessionstorage-client-versus-server-user-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server User Tutorial<\/a>.<\/p-->\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>To click\/touch one of those Google Chart Geo Chart lines between Emoji Flag Markers will show a new Google Maps directions web page with transport times and detail, as well as an inhouse crow fly distance of that trip leg, as shown up the top right of today&#8217;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_user.jpg\" title=\"tutorial picture\" rel=\"noopener\">tutorial picture<\/a>.<\/p>\n<hr>\n<p id='wsscvsot'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Order Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-order-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Order 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Order Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_order.jpg\" title=\"Window SessionStorage Client Versus Server Order Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Order Tutorial<\/p><\/div>\n<p>If we are to honour our thoughts of being able to use our current Capital City Find Matching Country Report web application as a Trip Planner &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-integration-tutorial\/'>\n<p>Our primary integration today is to (software) integrate the great <a target=\"_blank\" title='Weather Underground' href='http:\/\/www.wunderground.com' rel=\"noopener\">Weather Underground<\/a> and its great API service for autocomplete name searches for weather (and hurricane) information.  Why bother?  Well, can you not envisage a user using that Ajax functionality of yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Ajax Tutorial' href='#wsscvsat'>Window SessionStorage Client Versus Server Ajax Tutorial<\/a> as a trip planner, perhaps, or as a &#8220;checking up on relatives overseas&#8221; tool, perhaps?   And not all the capital cities are timezone places, and so for some of those we can use Weather integration to still show apt online information when click\/touching a Countries Report row.  Speaking of this &#8220;row&#8221;, we make an improvement whereby on a first click of a right hand (Country) row cell, that cell is not initially a <i>contenteditable=&#8221;true&#8221;<\/i> one (that may frustrate showing the keyboard on mobile, when most likely it was the row touch intended), but then becomes a <i>contenteditable=&#8221;true&#8221;<\/i> cell henceforth.<\/p>\n<\/blockquote>\n<p> &#8230; then yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Flags Tutorial' href='#wsscvsft'>Window SessionStorage Client Versus Server Flags Tutorial<\/a> &#8220;progress to now&#8221; needs to take notice of a user&#8217;s order of multiple select (dropdown) element click\/touching of Capital City option (sub)elements, just as we did with the recent <a target=\"_blank\" title='User Controlled Dynamic Javascript YouTube Embedded API Ordered Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/user-controlled-dynamic-javascript-youtube-embedded-api-ordered-tutorial\/' rel=\"noopener\">User Controlled Dynamic Javascript YouTube Embedded API Ordered Tutorial<\/a>&#8216;s web application project to allow for a user ordered <a target=\"_blank\" title='YouTube videos' href='https:\/\/www.youtube.com' rel=\"noopener\">YouTube<\/a> video playlist.<\/p>\n<p>Because what is a Trip Planner without an ordered trip?  Well, that is debatable, but what isn&#8217;t (debatable), is that there will be people in the world who appreciate the &#8220;mapping out&#8221; of a proposed Trip Planning Itinerary.  What could we call on here?  We can think of the <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.' rel=\"noopener\">Google Chart<\/a> <a target=\"_blank\" href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/geochart' title='Google Geo Charts' rel=\"noopener\">Geo Chart<\/a> work around about the time of <a target=\"_blank\" title='Google Geo Chart Co-ordinate Emojis Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/google-geo-chart-co-ordinate-emojis-tutorial\/' rel=\"noopener\">Google Geo Chart Co-ordinate Emojis Tutorial<\/a>, when we started using &#8230;<\/p>\n<ul>\n<li>a world map &#8230; with &#8230;<\/li>\n<li>emoji markers &#8230; and optionally &#8230;<\/li>\n<li>joined up by straight lines<\/li>\n<\/ul>\n<p> &#8230; an idea for a Trip Plan itinerary synopsis, perhaps?!<\/p>\n<p>If you examined closely yesterday&#8217;s code changes you will have noticed our collecting of TimeZone Place geographical latitude and longitude information.  Today, we start making use of that preparatory work with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html--------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">our changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html--------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link.<\/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\/window-sessionstorage-client-versus-server-order-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Order Tutorial<\/a>.<\/p-->\n<p><b><i>Stop Press<\/i><\/b><\/p>\n<p>The &#8220;emoji markers&#8221; above (as of 2 January 2020) will be &#8220;country flags&#8221; (as per <a title='Window SessionStorage Client Versus Server Flags Tutorial' href='#wsscvsft'>Window SessionStorage Client Versus Server Flags Tutorial<\/a> ideas), as defined.<\/p>\n<hr>\n<p id='wsscvsft'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Flags Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-flags-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Flags 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Flags Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_flag.jpg\" title=\"Window SessionStorage Client Versus Server Flags Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Flags Tutorial<\/p><\/div>\n<p>Yes, there&#8217;s more to do onto yesterday&#8217;s <a title='Window SessionStorage Client Versus Server CSS Tutorial' href='#wsscvscsst'>Window SessionStorage Client Versus Server CSS Tutorial<\/a>&#8216;s Capital City Find Matching Country Report web application project, in our eyes.  We have not even mentioned &#8220;Internationalization&#8221; as a concept up to now. In this line of thinking &#8230;<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>Emoji flags via ISO 2 character country codes are dead easy via <a target=\"_blank\" title='Regional Indicator Symbol' href='https:\/\/emojiterra.com\/regional-indicator-symbol-letter-a\/' rel=\"noopener\">Regional Indicator Symbol<\/a> characters &#8230;<\/p>\n<p><code><br \/>\n      var lri=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";<br \/>\n      var dri=[\"127462\",\"127463\",\"127464\",\"127465\",\"127466\",\"127467\",\"127468\",\"127469\",\"127470\",\"127471\",\"127472\",\"127473\",\"127474\",\"127475\",\"127476\",\"127477\",\"127478\",\"127479\",\"127480\",\"127481\",\"127482\",\"127483\",\"127484\",\"127485\",\"127486\",\"127487\"];<br \/>\n<br \/>\n      var thiscc='AU'; \/\/ ISO 2 character countrycode for Australia<br \/>\n      var ccsuff='', ccchar=' ';<br \/>\n      for (var iccsuff=0; iccsuff&lt;thiscc.length; iccsuff++) {<br \/>\n        ccchar=thiscc.substring(iccsuff, eval(1 + eval('' + iccsuff))).toUpperCase();<br \/>\n        ccsuff+='&#' + dri[eval('' + lri.indexOf(ccchar))] + ';';<br \/>\n      }<br \/>\n      document.getElementById('lastflag').innerHTML=ccsuff;<br \/>\n<\/code><\/p>\n<p> &#8230; to result in (<b>via<\/b> &lt;span <b>style=font-size:64px;<\/b>&gt;&amp;#127462;&amp;#127482;&lt;\/span&gt;) &#8230;<\/p>\n<p><code><br \/>\n<span style=font-size:64px;>&#127462;&#127482;<\/span><br \/>\n<\/code><\/p>\n<p> &#8230; providing interest and general translatability to <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link.<\/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\/window-sessionstorage-client-versus-server-flags-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Flags Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvscsst'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server CSS Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-css-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server CSS 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server CSS Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_links_css.jpg\" title=\"Window SessionStorage Client Versus Server CSS Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server CSS Tutorial<\/p><\/div>\n<p>Further to yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Integration Tutorial' href='#wsscvsit'>Window SessionStorage Client Versus Server Integration Tutorial<\/a> we have a two pronged improvements set for you today with our current Capital City Find Matching Country Report web application project &#8230;<\/p>\n<ul>\n<li>CSS styling changes &#8230; and &#8230;<\/li>\n<li>additional functionality for Email and SMS links back to our current Capital City Find Matching Country Report web application project (to complete the cycle)<\/li>\n<\/ul>\n<p>We use several modes of CSS application (the first and last of particular relevance to today&#8217;s &#8220;highlighting of workflow&#8221; improvements) &#8230;<\/p>\n<ul>\n<li>&#8220;static&#8221; internal CSS coding within <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html------GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link&#8217;s new CSS and linking improvements, which caused <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html--------GETME\" title=\"colour_wheel.html\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html--------GETME\" title=\"colour_wheel.html\" rel=\"noopener\">colour_wheel.html<\/a>&#8216;s colour wheel (at this <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html\" title='Click picture' rel=\"noopener\">live run<\/a> link) to be affected (by integrations &#8220;up&#8221;, opening up the <a target=\"_blank\" href='\/\/map.google.com' title='Google' rel=\"noopener\">Google Maps<\/a> and <a target=\"_blank\" title='YouTube videos' href='https:\/\/www.youtube.com' rel=\"noopener\">YouTube<\/a> interfacing emoji buttons there)<\/li>\n<li>&#8220;static&#8221; internal HTML &#8220;style&#8221; attribute styling<\/li>\n<li>&#8220;dynamic&#8221; Javascript DOM HTML &#8220;style&#8221; attribute changes<\/li>\n<li>&#8220;dynamic&#8221; Javascript DOM &#8220;class&#8221; modifications to dovetail with the <i>&#8220;static&#8221; internal CSS coding<\/i> as above<\/li>\n<\/ul>\n<p> &#8230; the &#8220;static&#8221; measures often helping to highlight the web application&#8217;s main workflow of user interaction and the &#8220;dynamic&#8221; measures helping to alert the user as to where to proceed with their &#8220;workflow&#8221;.<\/p>\n<p>In terms of CSS styling work &#8230;<\/p>\n<ol>\n<li>for non-mobile platforms we allow for more columns to be applied to our Capitals select (dropdown) element (in order to reduce some user scrolling, as does our new additional A-Z letter basis sorting functionality) as per &#8230; the <i>&#8220;dynamic&#8221; Javascript DOM &#8220;class&#8221; modifications<\/i> &#8230;<br \/>\n<code><br \/>\n<i>if (!navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<\/i><br \/>\n<i>    document.getElementById('lefttd').className='lefttd';<\/i><br \/>\n<i>}<\/i><br \/>\n<\/code><br \/>\n &#8230; dovetailing with the <i>&#8220;static&#8221; internal CSS coding<\/i> &#8230;<br \/>\n<code><br \/>\n&lt;style&gt;<br \/>\n<i>.lefttd { <\/i><br \/>\n<i>  column-count: 4; <\/i><br \/>\n<i>  max-height: 35%; <\/i><br \/>\n<i>  vertical-align: top; <\/i><br \/>\n<i>  max-width: 70%; <\/i><br \/>\n<i>  font-size: 8px; <\/i><br \/>\n<font color=blue>  background-color: rgba(205,205,205,0.5);<br \/>\n  background-image: -webkit-gradient(<br \/>\n  linear,<br \/>\n  right bottom,<br \/>\n  left top,<br \/>\n  color-stop(0, rgba(205, 205, 205, 0.8)),<br \/>\n  color-stop(0.50, rgba(255, 255, 0, 0.2))<br \/>\n  );<br \/>\n  background-image: -o-linear-gradient(left top, rgba(205, 205, 205, 1) 0%, rgba(255, 255, 0, 0.2) 50%);<br \/>\n  background-image: -moz-linear-gradient(left top, rgba(205, 205, 205, 1) 0%, rgba(255, 255, 0, 0.2) 50%);<br \/>\n  background-image: -webkit-linear-gradient(left top, rgba(205, 205, 205, 1) 0%, rgba(255, 255, 0, 0.2) 50%);<br \/>\n  background-image: -ms-linear-gradient(left top, rgba(205, 205, 205, 1) 0%, rgba(255, 255, 0, 0.2) 50%);<br \/>\n  background-image: linear-gradient(to left top, rgba(205, 205, 205, 1) 0%, rgba(255, 255, 0, 0.2) 50%);<\/font><br \/>\n<i>}<\/i><br \/>\n&lt;\/style&gt;<br \/>\n<\/code><br \/>\n &#8230; and please note that around here at RJM Programming we have a &#8220;far from hard and fast rule&#8221; (but a rule regardless) regarding HTML element <i>ID<\/i> and <i>class<\/i> attributes that they concern (and (usually) be compartmentalised into) <i>Javascript (DOM) manipulations<\/i> and <i>CSS styling<\/i> issues respectively &#8230; and <font color=blue>add a linear-gradient background to the table cell when expecting the initial user interaction on non-mobile platforms<\/font>\n<\/li>\n<li>a <i>&#8220;dynamic&#8221; Javascript DOM &#8220;class&#8221; modification<\/i> &#8230; document.getElementById(&#8216;myrepsb&#8217;).className=&#8217;dglow&#8217;; &#8230; is made to the &#8220;Report&#8230;&#8221; button at the Capitals select (dropdown) <i>onfocusout<\/i> event so as to highlight (with <a target=\"_blank\" title='W3schools glowing text information, thanks' href='https:\/\/www.w3schools.com\/howto\/tryit.asp?filename=tryhow_css_glowing_text' rel=\"noopener\">&#8220;glow&#8221; inspired<\/a> styling) where user interaction may flow to<\/li>\n<\/ol>\n<p>As far as links go, you may expect to need serverside means to construct these in online Email and SMS message interfacing, but email (client program) products like <a target=\"_blank\" href='https:\/\/gmail.com' rel=\"noopener\">Gmail<\/a> parse your ascii text and convert http: or https: protocol URLs in your Email body to hyperlinks, as does the Messages SMS application here on this MacBook Pro using macOS Mojave.   Cute, huh?!  So to close the circle back from remote thar&#8217; parts back to our web application is a simple matter of, in broad brush terms &#8230;<\/p>\n<ul>\n<li>adding two new buttons called &#8220;Email Columns and Links &#8230;&#8221; and &#8220;SMS Columns and Links &#8230;&#8221; that &#8230;<\/li>\n<li>set a global var<font size=1>iable<\/font> andlinkto = true;  &#8230; setting in play, within the report writing code (that likes monospaced fonts) &#8230;<\/li>\n<li>add a new links column to the right with URLs like &#8230;<br \/>\n<code><a target=\"_blank\" title='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm?andgo=y&#038;countries=Belize&#038;capitals=Belmopan' href='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm?andgo=y&#038;countries=Belize&#038;capitals=Belmopan' rel=\"noopener\">https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm?andgo=y&amp;countries=Belize&amp;capitals=Belmopan<\/a><\/code><br \/>\n &#8230; to tell your client programs to form the hyperlinks for us (if they are &#8220;of the mood&#8221;, that is!)\n<\/li>\n<\/ul>\n<p>To improve user experience we use <i>&#8220;dynamic&#8221; Javascript DOM HTML &#8220;style&#8221; attribute change<\/i> means to easier close the &#8220;Colour Wheel&#8221; helper web application &#8220;above the fold&#8221; by changing the CSS z-index (Javascript DOM [element].style.zIndex) of elements accordingly, when the user clicks other elements.  You can see all this with the first &#8220;<a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html------GETME' title='wls_vs_php.htm' rel=\"noopener\">the changed<\/a>&#8221; link above, where all &#8220;glow&#8221; CSS styling will also feature prominently.<\/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\/window-sessionstorage-client-versus-server-css-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server CSS Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvsit'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Integration Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-integration-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Integration 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Integration Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_integration.jpg\" title=\"Window SessionStorage Client Versus Server Integration Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Integration Tutorial<\/p><\/div>\n<p>We hope, when performing a &#8220;software integration&#8221; task, that the two or more components of that integration work <i>with<\/i> each other&#8217;s talents, rather than a big tussle like reinventing the wheel.  This ideal makes the work &#8230;<\/p>\n<ul>\n<li>sometimes difficult but rewarding because &#8230;<\/li>\n<li>the differences between two independent software components can be quite large and daunting &#8230; and the programmer has to see that &#8230;<\/li>\n<li>care is applied so as not to wreck previous functionality and integrations in making the current integration work<\/li>\n<\/ul>\n<p> &#8230; and that is why we&#8217;ve made corollaries to &#8220;building from scratch&#8221; (when planning and design is a huge component) can be a lot simpler than a software integration &#8220;renovation&#8221;, in the past, here at this blog.<\/p>\n<p>Our primary integration today is to (software) integrate the great <a target=\"_blank\" title='Weather Underground' href='http:\/\/www.wunderground.com' rel=\"noopener\">Weather Underground<\/a> and its great API service for autocomplete name searches for weather (and hurricane) information.  Why bother?  Well, can you not envisage a user using that Ajax functionality of yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Ajax Tutorial' href='#wsscvsat'>Window SessionStorage Client Versus Server Ajax Tutorial<\/a> as a trip planner, perhaps, or as a &#8220;checking up on relatives overseas&#8221; tool, perhaps?   And not all the capital cities are timezone places, and so for some of those we can use Weather integration to still show apt online information when click\/touching a Countries Report row.  Speaking of this &#8220;row&#8221;, we make an improvement whereby on a first click of a right hand (Country) row cell, that cell is not initially a <i>contenteditable=&#8221;true&#8221;<\/i> one (that may frustrate showing the keyboard on mobile, when most likely it was the row touch intended), but then becomes a <i>contenteditable=&#8221;true&#8221;<\/i> cell henceforth.<\/p>\n<p>As a user experience improvement for &#8220;trip planners&#8221; perhaps, we allow the user to alphabetically sort the presented select (dropdown) element entries &#8230;<\/p>\n<p><code><br \/>\nvar firstopt='';<br \/>\nvar wasopts='';<br \/>\nvar restopts='';<br \/>\n<br \/>\nfunction readyitforsort(iselid) {<br \/>\n  var optsare=[];<br \/>\n  var huhisel=document.getElementById(iselid).innerHTML;<br \/>\n  var huhsopts=huhisel.split('&lt;\/option&gt;');<br \/>\n  for (var ihuh=0; ihuh&lt;huhsopts.length; ihuh++) {<br \/>\n    if (huhsopts[ihuh].trim() != '') {<br \/>\n      if (firstopt == '') {<br \/>\n        firstopt=huhsopts[ihuh] + '&lt;\/option&gt;';<br \/>\n      } else {<br \/>\n        wasopts+=huhsopts[ihuh].replace('option ','option data-ih=\"' + (huhsopts[ihuh].split('&gt;')[eval(-1 + huhsopts[ihuh].split('&gt;').length)] + '\" ')) + '&lt;\/option&gt;';<br \/>\n        optsare.push(huhsopts[ihuh].replace('option ','option data-ih=\"' + (huhsopts[ihuh].split('&gt;')[eval(-1 + huhsopts[ihuh].split('&gt;').length)] + '\" ')) + '&lt;\/option&gt;');<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n  optsare.sort();<br \/>\n  for (var jhuh=0; jhuh&lt;optsare.length; jhuh++) {<br \/>\n    restopts+=optsare[jhuh];<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; controlled by a new dropdown in the left hand column header cell.<\/p>\n<p>We also allow the user to move the iframe element with some positioning emoji buttons near the &#8220;Close&#8221; button one (of yesterday&#8217;s work).<\/p>\n<p>Into the future, too, we&#8217;ll have more to say regarding the germination of an idea &#8220;to allow a mobile onmouseover simulator (of sorts)&#8221; be to allow the user to perform a swipe across an individual HTML element of interest on mobile platforms (ie. harness ontouchmove event) as per (so far) &#8230; <b>kicked off<\/b> by &#8220;&lt;body <b>onload=&#8221; setTimeout(athn, 5000); &#8220;<\/b>&gt;&#8221; &#8230;<\/p>\n<p><code><br \/>\nvar last24='';<br \/>\nvar rectdc;<br \/>\n<br \/>\nfunction nodivalert() {<br \/>\n  document.getElementById('divalert').style.display='none';<br \/>\n  document.getElementById('divalert').style.zIndex='-456';<br \/>\n  document.getElementById('divalert').style.left=('-' + rectdc.left).replace('px','') + 'px';<br \/>\n  document.getElementById('divalert').style.top=('-' + rectdc.top).replace('px','') + 'px';<br \/>\n}<br \/>\n<br \/>\nfunction ourdivalert(inmsg) {<br \/>\n  document.getElementById('divalert').style.position='absolute';<br \/>\n  document.getElementById('divalert').style.left=('' + rectdc.left).replace('px','') + 'px';<br \/>\n  document.getElementById('divalert').style.top='' + eval(-80 + eval(('' + rectdc.top).replace('px',''))) + 'px';<br \/>\n  document.getElementById('divalert').style.backgroundColor='#e0e0e0';<br \/>\n  document.getElementById('divalert').style.display='block';<br \/>\n  document.getElementById('divalert').style.zIndex='456';<br \/>\n  document.getElementById('divalert').style.opacity='0.8';<br \/>\n  document.getElementById('divalert').style.padding='5px 5px 5px 5px';<br \/>\n  document.getElementById('divalert').innerHTML=inmsg + '&lt;br&gt;&lt;br&gt;&lt;input type=button value=Close onclick=nodivalert();&gt;&lt;\/input&gt;';<br \/>\n  setTimeout(nodivalert,9000);<br \/>\n}<br \/>\n<br \/>\nfunction athn() {<br \/>\n  rectdc=document.getElementById('dc').getBoundingClientRect();<br \/>\n  if (navigator.userAgent.match(\/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile\/i)) {<br \/>\n  document.getElementById('dc').ontouchmove=function(event) { if (last24.substring(0,eval(-1 + last24.length)) == event.target.title.substring(0,eval(-1 + event.target.title.length))) { last24=last24; } else { last24=event.target.title; ourdivalert(event.target.title); } }<br \/>\n  } else {<br \/>\n  document.getElementById('dc').onmousemove=function(event) { if (last24.substring(0,eval(-1 + last24.length)) == event.target.title.substring(0,eval(-1 + event.target.title.length))) { last24=last24; } else { last24=event.target.title; ourdivalert(event.target.title); } }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; working <i>with<\/i> <b>the new<\/b> HTML &#8230;<\/p>\n<p><code><br \/>\n<b>&lt;div id=divalert&gt;&lt;\/div&gt;<\/b><br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; to try to allow the &#8220;explainer of an element&#8221; advantages non-mobile platforms have for hovering over an HTML element with a <i>title<\/i> attribute filled in.<\/p>\n<p>And so, yet again, see <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-----GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-----GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link&#8217;s new Weather integration functionality.  It caused <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html--------GETME\" title=\"colour_wheel.html\" rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html--------GETME\" title=\"colour_wheel.html\" rel=\"noopener\">colour_wheel.html<\/a>&#8216;s colour wheel (at this <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html\" title='Click picture' rel=\"noopener\">live run<\/a> link) to be affected (by integrations &#8220;up&#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\/window-sessionstorage-client-versus-server-integration-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Integration Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvsat'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Ajax Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-ajax-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Ajax 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Ajax Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_ajax.jpg\" title=\"Window SessionStorage Client Versus Server Ajax Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Ajax Tutorial<\/p><\/div>\n<p>We have a few &#8220;clientside chestnuts&#8221; to use with our current Capital City Find Matching Country Report web application project today, those being &#8230;<\/p>\n<ul>\n<li> <a target=\"_blank\" title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29' rel=\"noopener\">Ajax<\/a> functionality, kicked off by an &#8220;onclick&#8221; event set of logic, allowing mobile platforms to also have a look in (the look in that they miss when the event logic is off the &#8220;onmouseover&#8221; event)<\/li>\n<li>iframe and its &#8230;\n<ol>\n<li><i><a target=\"_blank\" title='Iframe srcdoc information from w3schools' href='https:\/\/www.w3schools.com\/tags\/att_iframe_srcdoc.asp' rel=\"noopener\">srcdoc<\/a><\/i> attribute (&#8220;content&#8221; alternative to <i>src<\/i> &#8220;url&#8221; attribute) &#8230; along with, and crucially needing (because <i>srcdoc<\/i> ignores its own document.body <i>onload<\/i> goings on, that we need the <a target=\"_blank\" href='https:\/\/www.rjmprogramming.com.au\/ITblog\/?s=client+pre-emptive+iframe' title='Client Pre-emptive Iframe techniques blog postings' rel=\"noopener\">&#8220;Iframe Client Pre-Emptive&#8221;<\/a> methods below to circumvent) the &#8230;<\/li>\n<li><i>onload<\/i> event opportunity of an iframe element (we group into &#8220;Iframe Client Pre-Emptive&#8221; methods, here)<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; adding onto yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Canvas Tutorial' href='#wsscvsct'>Window SessionStorage Client Versus Server Canvas Tutorial<\/a>.<\/p>\n<p>It&#8217;s not that involved with the Ajax work today, given that there are no cross-domain issues, though there are cross-protocol (SSL https: versus non-SSL http:) issues to be careful about.  Those can be addressed because the web application is recalled to present its &#8220;Country Report&#8221; and that is the opportunity to check on protocol navigation requirements.<\/p>\n<p>Along the way, we also make this happen for the user on &#8230;<\/p>\n<ul>\n<li>click\/touching a table row &#8230; it sets off new &#8220;tr&#8221; (table row) element logic calling our (inhouse) Timezone and Wikipedia Place Information helper (HTML) via Ajax (so not leaving the webpage) &#8230; and because of place name oddities we allow for &#8230;<\/li>\n<li>&#8220;td&#8221; (table cell) element user amendments by setting their <i><a target=\"_blank\" title='Global contenteditable attribute information from W3schools' href='https:\/\/www.w3schools.com\/tags\/att_global_contenteditable.asp' rel=\"noopener\">contenteditable<\/a><\/i> attributes to &#8220;true&#8221; (since fixed, but we found the Timezone Europe\/Tirane pointing at Tirane in Albania used to be spelt &#8220;Tirana&#8221;)<\/li>\n<\/ul>\n<p> &#8230; that latter methodology normally a technique we apply to &#8220;div&#8221; elements <font size=1>(so, there you are!)<\/font><\/p>\n<p>Also used are &#8220;overlay&#8221; techniques, two of the &#8220;usual suspects&#8221; here coming into play, to present to the &#8220;Ajax content to srcdoc iframe arrangements&#8221; &#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' rel=\"noopener\">position:absolute<\/a> property (with associated top and left (px defined) properties)<\/li>\n<li><a target=\"_blank\" title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp' rel=\"noopener\">z-index<\/a><\/li>\n<\/ul>\n<p>Yet again, see <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html----GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html----GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link&#8217;s new &#8220;Ajax&#8221; functionality.<\/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\/window-sessionstorage-client-versus-server-ajax-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Ajax Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvsct'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Canvas Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-canvas-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Canvas 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Canvas Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_canvas.jpg\" title=\"Window SessionStorage Client Versus Server Canvas Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Canvas Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Share Tutorial' href='#wsscvsst'>Window SessionStorage Client Versus Server Share Tutorial<\/a> dealt with ascii text clipboard copy assisted sharing options with our current Capital City Find Matching Country Report web application project.  This suited both Email and SMS share options we coded for, but today&#8217;s extension of functionality from &#8220;ascii text&#8221; data to &#8220;graphical data&#8221; only suits Email sharing.  The other caveat with our work is that no serverside (for us, PHP) help is allowed, so no PHP mail here.<\/p>\n<p>What comes into play with a &#8220;graphical data&#8221; clientside (only) sharing approach?  It will not surprise many readers that, for us, it involves &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp' rel=\"noopener\">canvas<\/a> element &#8230; converting HTML table outerHTML &#8220;ascii text&#8221; data &#8230; via &#8230;<\/li>\n<li>canvas drawing methods &#8220;[canvasContext].<a target=\"_blank\" href='http:\/\/www.w3schools.com\/tags\/canvas_stroketext.asp' title='HTML5 Canvas strokeRect() method information from w3schools ... thanks' rel=\"noopener\">strokeRect<\/a>()&#8221; and &#8220;[canvasContext].<a target=\"_blank\" href='http:\/\/www.w3schools.com\/tags\/canvas_stroketext.asp' title='HTML5 Canvas strokeText() method information from w3schools ... thanks' rel=\"noopener\">strokeText<\/a>()&#8221; via &#8220;[cellElement].<a target=\"_blank\" title='Javascript getBoundingClientRect method information from Mozilla' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Element\/getBoundingClientRect' rel=\"noopener\">getBoundingClientRect<\/a>()&#8221; &#8230; to convert that canvas element content via &#8230;<\/li>\n<li>[canvasElement].<a target=\"_blank\" title='HTML5 canvas element toDataURL method information' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/HTMLCanvasElement\/toDataURL' rel=\"noopener\">toDataURL<\/a>() &#8230; to an &#8230;<\/li>\n<li>img element nested in a div <a target=\"_blank\" title=\"Global\" contenteditable attribute information from rel=\"noopener\">contenteditable<\/a>=true element &#8230; so as to hook in with today&#8217;s <a target=\"_blank\" title='Very useful link, thanks' href='https:\/\/stackoverflow.com\/questions\/27863617\/is-it-possible-to-copy-a-canvas-image-to-the-clipboard' rel=\"noopener\">very useful helper link<\/a>, thanks &#8230; use &#8230;<\/li>\n<li>\n<code><br \/>\nfunction tabletoclipboard(canvas) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/27863617\/is-it-possible-to-copy-a-canvas-image-to-the-clipboard<br \/>\n var img = document.createElement('img');<br \/>\n img.src = canvas.toDataURL();<br \/>\n<br \/>\n var div = document.createElement('div');<br \/>\n div.contentEditable = true;<br \/>\n div.appendChild(img);<br \/>\n document.body.appendChild(div);<br \/>\n<br \/>\n \/\/ do copy<br \/>\n SelectText(div);<br \/>\n document.execCommand('Copy');<br \/>\n document.body.removeChild(div);<br \/>\n}<br \/>\n<br \/>\nfunction SelectText(element) { \/\/ thanks to https:\/\/stackoverflow.com\/questions\/27863617\/is-it-possible-to-copy-a-canvas-image-to-the-clipboard<br \/>\n    var doc = document;<br \/>\n    if (doc.body.createTextRange) {<br \/>\n        var range = document.body.createTextRange();<br \/>\n        range.moveToElementText(element);<br \/>\n        range.select();<br \/>\n    } else if (window.getSelection) {<br \/>\n        var selection = window.getSelection();<br \/>\n        var range = document.createRange();<br \/>\n        range.selectNodeContents(element);<br \/>\n        selection.removeAllRanges();<br \/>\n        selection.addRange(range);<br \/>\n    }<br \/>\n}<br \/>\n<\/code>\n<\/li>\n<li>to leave the user&#8217;s device&#8217;s clipboard containing a useful table (with linework) &#8230; ready to &#8230;<\/li>\n<li>paste into an email body section<\/li>\n<\/ul>\n<p> &#8230; sharing off to an emailee collaborator.<\/p>\n<p>Again, see <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html---GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link&#8217;s new &#8220;Email Table&#8221; button functionality.<\/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\/new-window-sessionstorage-client-versus-server-share-tutorial\/' rel=\"noopener\">New Window SessionStorage Client Versus Server Share Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvsst'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Share Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-share-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Share 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Share Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_email.jpg\" title=\"Window SessionStorage Client Versus Server Share Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Share Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Window SessionStorage Client Versus Server Tutorial' href='#wsscvst'>Window SessionStorage Client Versus Server Tutorial<\/a> has been amended today for two new sharing and collaboration options, those being &#8230;<\/p>\n<ul>\n<li>email<\/li>\n<li>SMS<\/li>\n<\/ul>\n<p> &#8230; but you may well be familiar with the restrictions on email and SMS client (program) approaches to this, coming from HTML &#8220;a&#8221; link &#8220;mailto:&#8221; and &#8220;sms:&#8221; href property prefixes respectively.  We&#8217;re going to need help with the 800 odd character (length) restrictions with the (resultant) web address (bar) URL, but what?  How about working off the great advice of this <a target=\"_blank\" title='Great link' href='https:\/\/hackernoon.com\/copying-text-to-clipboard-with-javascript-df4d4988697f' rel=\"noopener\">wonderful link<\/a>, thanks, to copy what we&#8217;d have assembled into an ascii text Report into the characters contained by the user&#8217;s device&#8217;s clipboard?<\/p>\n<p><code><br \/>\nfunction copytoclipboard(str) { \/\/ thanks to https:\/\/hackernoon.com\/copying-text-to-clipboard-with-javascript-df4d4988697f<br \/>\n  var el = document.createElement('textarea');<br \/>\n  el.value = str;<br \/>\n  el.setAttribute('readonly', '');<br \/>\n  el.style.position = 'absolute';<br \/>\n  el.style.left = '-9999px';<br \/>\n  document.body.appendChild(el);<br \/>\n  el.select();<br \/>\n  document.execCommand('copy');<br \/>\n  document.body.removeChild(el);<br \/>\n}<br \/>\n<\/code><\/p>\n<p>An issue that springs up here using such clipboard ascii text content, whenever you get the Font choice given to you, pick a monospaced Font like Courier New or &#8220;Fixed Width&#8221;.<\/p>\n<p>See <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html--GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html--GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a>&#8216;s <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a> link&#8217;s new sharing functionality.<\/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\/window-sessionstorage-client-versus-server-share-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Share Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wsscvst'>Previous relevant <a target=\"_blank\" title='Window SessionStorage Client Versus Server Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-sessionstorage-client-versus-server-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server 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\/wls_vs_php.htm\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window SessionStorage Client Versus Server Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php_session.jpg\" title=\"Window SessionStorage Client Versus Server Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window SessionStorage Client Versus Server Tutorial<\/p><\/div>\n<p>Sometimes it&#8217;s the case at this blog that we&#8217;d like to introduce a new topic, but do not do so, because we cannot show any real world (or real application) use of that concept.  So it has been, up until now, with the concept of (web browser) window (object) <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp' rel=\"noopener\">sessionStorage<\/a> property.  But yesterday&#8217;s <a title='Window LocalStorage Client Versus Server Primer Tutorial' href='#wlscvspt'>Window LocalStorage Client Versus Server Primer Tutorial<\/a> represented an opportunity akin to when Haley&#8217;s Comet gets at its closest to the Earth &#8230; <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=0j6g_uUhH2c' rel=\"noopener\">while you see a chance, take it<\/a> &#8230; chance because of that nuance whereby we were not trying to store data for any other purpose than passing data onto &#8230;<\/p>\n<ol>\n<li>a known entity &#8230; ie. same web application &#8230; at &#8230;<\/li>\n<li>a known time &#8230; ie. immediately<\/li>\n<\/ol>\n<p> &#8230; two conditions that make the code design &#8220;marginally&#8221; more ideal for the window object property concept of <a target=\"_blank\" title='Window object localStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp' rel=\"noopener\">sessionStorage<\/a> rather than <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp' rel=\"noopener\">localStorage<\/a>, in that any &#8230;<\/p>\n<p><code><br \/>\nlocalStorage.removeItem([knownLocalStorageName]);<br \/>\n<\/code><\/p>\n<p> &#8230; becomes superfluous as with <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp' rel=\"noopener\">sessionStorage<\/a> data will disappear between web browser sessions, anyway.<\/p>\n<p>We offer this new concept as a non-default option of a select (dropdown) element replacement to the h1 element hardcoding &#8220;localStorage&#8221; with <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">the changed<\/a<> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html-GETME\" title=\"wls_vs_php.htm\" rel=\"noopener\">wls_vs_php.htm<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.htm\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a>.  The other nuance of difference with <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp' rel=\"noopener\">sessionStorage<\/a> usage is that in the document.body <i>onload<\/i> event logic, we may as well <font color=green>(as part of other changes)<\/font> pre-emptively look for, and if there, respond to, any found <a target=\"_blank\" title='Window object sessionStorage property' href='https:\/\/www.w3schools.com\/jsref\/prop_win_sessionstorage.asp' rel=\"noopener\">sessionStorage<\/a> data points, <font color=blue>even without the user having flagged it specifically<\/font> &#8230;<\/p>\n<p><code><br \/>\nvar datamode='localStorage';<br \/>\n<br \/>\nfunction checkforreport() {<br \/>\n  var divcont='';<br \/>\n  var dcaps, dctys, idis;<br \/>\n  if (getcapitals == 'localStorage') {<br \/>\n   if (window.localStorage) {<br \/>\n    getcapitals=decodeURIComponent(localStorage.getItem('wls_vs_php_capitals')).replace(\/\\+\/g,' ');<br \/>\n    localStorage.removeItem('wls_vs_php_capitals');<br \/>\n   } else {<br \/>\n    getcapitals='';<br \/>\n   }<br \/>\n  } <font color=green>else if (getcapitals == 'sessionStorage') {<br \/>\n   document.getElementById('smode').value=getcapitals;<br \/>\n   datamode=getcapitals;<br \/>\n   if (window.sessionStorage) {<br \/>\n    getcapitals=decodeURIComponent(sessionStorage.getItem('wls_vs_php_capitals')).replace(\/\\+\/g,' ');<br \/>\n   } else {<br \/>\n    getcapitals='';<br \/>\n   }<br \/>\n  }<\/font> <font color=blue>else if (getcapitals == '' && window.sessionStorage) {<br \/>\n   getcapitals=decodeURIComponent(('' + sessionStorage.getItem('wls_vs_php_capitals')).replace(\/^null$\/g,'')).replace(\/\\+\/g,' ');<br \/>\n   if (getcapitals != '') {<br \/>\n    document.getElementById('smode').value='sessionStorage';<br \/>\n    datamode='sessionStorage';<br \/>\n   }<br \/>\n  }<\/font><br \/>\n  if (getcountries == 'localStorage') {<br \/>\n   if (window.localStorage) {<br \/>\n    getcountries=decodeURIComponent(localStorage.getItem('wls_vs_php_countries')).replace(\/\\+\/g,' ');<br \/>\n    if (getcapitals.replace('localStorage','') != '' && getcountries.replace('localStorage','') != '') { document.getElementById('myh1').innerHTML+=' &lt;font size=1&gt;... yes, it was needed&lt;\/font&gt;'; }<br \/>\n    localStorage.removeItem('wls_vs_php_countries');<br \/>\n   } else {<br \/>\n    getcountries='';<br \/>\n   }<br \/>\n  } <font color=green>else if (getcountries == 'sessionStorage') {<br \/>\n   if (window.sessionStorage) {<br \/>\n    getcountries=decodeURIComponent(sessionStorage.getItem('wls_vs_php_countries')).replace(\/\\+\/g,' ');<br \/>\n    if (getcapitals.replace('sessionStorage','') != '' && getcountries.replace('sessionStorage','') != '') { document.getElementById('myh1').innerHTML+=' &lt;font size=1&gt;... yes, it was needed&lt;\/font&gt;'; }<br \/>\n   } else {<br \/>\n    getcountries='';<br \/>\n   }<br \/>\n  }<\/font> <font color=blue>else if (getcountries == '' && document.getElementById('smode').value == 'sessionStorage' && window.sessionStorage) {<br \/>\n   getcountries=decodeURIComponent(('' + sessionStorage.getItem('wls_vs_php_countries')).replace(\/^null$\/g,'')).replace(\/\\+\/g,' ');<br \/>\n   if (getcountries != '') {<br \/>\n    document.getElementById('smode').value='sessionStorage';<br \/>\n    datamode='sessionStorage';<br \/>\n   }<br \/>\n  }<\/font><br \/>\n  if (getcapitals != '' && getcountries != '') {<br \/>\n    divcont='&lt;table border=5 style=\"width:95%;vertical-align:top;background-color:white;\"&gt;&lt;tr style=background-color:#f0f0f0;\"&gt;&lt;th&gt;Capital&lt;\/th&gt;&lt;th&gt;Country&lt;\/th&gt;&lt;\/tr&gt;&lt;\/table&gt;';<br \/>\n    dcaps=getcapitals.split('|');<br \/>\n    dctys=getcountries.split('|');<br \/>\n    for (idis=0; idis&lt;dcaps.length; idis++) {<br \/>\n      divcont=divcont.replace('&lt;\/table&gt;', '&lt;tr&gt;&lt;td&gt;' + dcaps[idis] + '&lt;\/td&gt;&lt;td&gt;' + dctys[idis] + '&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;');<br \/>\n    }<br \/>\n    document.getElementById('dreport').innerHTML=divcont;<br \/>\n  }<br \/>\n  <font color=green>document.getElementById('smode').value=datamode;<\/font><br \/>\n }<br \/>\n<\/code><\/p>\n<p>Which beggars the question <a target=\"_blank\" title='Difference between sessionStorage and localStorage' href='https:\/\/www.google.com\/search?rlz=1C5CHFA_enAU832AU832&#038;sxsrf=ACYBGNQEjiBrN6mf-JpqOZbxckzjOREa5A%3A1577252199998&#038;ei=Z_UCXoHVPJLorQHI0peoAg&#038;q=differences+between+sessionStorage+and+localStorage&#038;oq=differences+between+sessionStorage+and+localStorage&#038;gs_l=psy-ab.3..0i7i30j0i333l3.36328.36328..36699...0.2..0.215.215.2-1......0....1..gws-wiz.......0i71.WuAPyJrUflA&#038;ved=0ahUKEwjBpOioitDmAhUSdCsKHUjpBSUQ4dUDCAs&#038;uact=5' rel=\"noopener\">&#8220;What are the differences between sessionStorage and localStorage?&#8221;<\/a>   A quick reading might surmise that &#8220;the latter has an expiration date&#8221;.  We leave you with an open ended <a target=\"_blank\" title='Google' href='https:\/\/google.com' rel=\"noopener\">Google<\/a> search so that you may extend your readings on this.<\/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\/window-sessionstorage-client-versus-server-tutorial\/' rel=\"noopener\">Window SessionStorage Client Versus Server Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wlscvspt'>Previous relevant <a target=\"_blank\" title='Window LocalStorage Client Versus Server Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/window-localstorage-client-versus-server-primer-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server 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\/wls_vs_php.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Window LocalStorage Client Versus Server Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.jpg\" title=\"Window LocalStorage Client Versus Server Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Window LocalStorage Client Versus Server Primer Tutorial<\/p><\/div>\n<p>Even though we rave on a lot about serverside PHP and its $_POST method=POST (versus HTML\/Javascript recipient via ? and &amp; argument $_GET method=GET scenario) data length advantages as the recipient of an HTML form method=POST set of data that could be sizeable, we&#8217;ve just realized that there is a client Javascript and window.localStorage methodology that may help alleviate the need to involve PHP (and any other serverside intervention) on occasions.<\/p>\n<p>Hint: Yes, we&#8217;ve raved on about this too?!  Does the blog posting title give it away?   Okay, yes, it should read <a target=\"_blank\" title='localStorage information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp' rel=\"noopener\">&#8220;localStorage&#8221;<\/a>, but thought we&#8217;d gone past such juvenile finickiness since the <a target=\"_blank\" title='Whac-A-Mole' href='https:\/\/en.wikipedia.org\/wiki\/Whac-A-Mole' rel=\"noopener\">Whac-A-Mole<\/a> controversy of <a target=\"_blank\" title='?' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-guillotine-follow-up-troubleshooting-tutorial\/' rel=\"noopener\">1st December 2019<\/a> (or even <a target=\"_blank\" title=\"The Great Tea Trolley Disaster of \u201967\" href='https:\/\/www.google.com\/search?q=The+Great+Tea+Trolley+Disaster+of+%E2%80%9967&#038;rlz=1C5CHFA_enAU832AU832&#038;oq=The+Great+Tea+Trolley+Disaster+of+%E2%80%9967&#038;aqs=chrome..69i57j69i64.232j0j4&#038;sourceid=chrome&#038;ie=UTF-8' rel=\"noopener\">The Great Tea Trolley Disaster of \u201967<\/a>, we daresay).<\/p>\n<p>It can even use a <a target=\"_blank\" title='?' href='http:\/\/www.youtube.com\/watch?v=MA2KmJMKFrQ' rel=\"noopener\">&#8220;self-destruct&#8221;<\/a> approach to the use of this &#8220;localStorage&#8221; on having used it because &#8230;<\/p>\n<ul>\n<li>the web application knows who is using it (localStorage) &#8230; and on having accessed and read it &#8230;<\/li>\n<li>the web application knows it (localStorage) is of no use to any other user (in this web application&#8217;s case, at least)<\/li>\n<\/ul>\n<p> &#8230; which is very pleasing for a Land Surveyor who likes to leave cow paddocks as they&#8217;ve seen them <font size=1>so to speak<\/font>.  Except it&#8217;s like having a ten tonne truck worth of data access in amongst the cow pats when having access to &#8220;localStorage&#8221; (or PHP), rather than a little piddle of calf wee <font size=1>(we<strike>e<\/strike> Metcalfes know a thing or two about these things!)<\/font> data access of ? and &amp; HTML\/Javascript URL arguments (or even if we were to use HTTP Cookies).<\/p>\n<p>It&#8217;s not as if we all have access to serverside language usage, though <i>we<\/i> do, because we really like PHP and <a target=\"_blank\" title='MAMP for Apache\/PHP\/MySql on Mac OS X local web server' href='http:\/\/www.mamp.info' rel=\"noopener\"><i>MAMP<\/i><\/a> and Apache\/PHP\/MySql web servers (and have arranged our development environment accordingly), but what if you are starting out in web development, and still want to allow for sizeable chunks of data with your web applications?  Huh?  Huh?!  See the possibilities?  Try our proof of concept <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html\" rel=\"noopener\">wls_vs_php.html<\/a> <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html\" title=\"Click picture\" rel=\"noopener\">Capital City Find Matching Country Report live run<\/a>, and highlight a whole swathe of (multiple mode) dropdown option Capital Cities holding down the shift key before pressing the yellow &#8220;Report&#8221; button.  If the URL ends up as &#8230;<\/p>\n<p><code>https:\/\/rjmprogramming.com.au\/HTMLCSS\/wls_vs_php.html?capitals=localStorage&countries=localStorage<\/code> <\/p>\n<p> &#8230; <font color=blue>that&#8217;s because<\/font> the web application&#8217;s &#8230;<\/p>\n<p><code><br \/>\nfunction analyze() {<br \/>\n  var purl=document.URL.split('#')[0].split('?')[0] + '?capitals=' + encodeURIComponent(document.getElementById('capitals').value) + '&countries=' + encodeURIComponent(document.getElementById('countries').value);<br \/>\n  if (<font color=green>purl.length &gt; 800<\/font>) {<br \/>\n    if (<font color=red>phpexists<\/font>) {<br \/>\n      document.getElementById('myform').method='POST';<br \/>\n      document.getElementById('myform').action='.\/wls_vs_php.php';<br \/>\n    } else <font color=purple>if (window.localStorage) {<\/font><br \/>\n      <font color=blue>localStorage.setItem('wls_vs_php_countries', encodeURIComponent(document.getElementById('countries').value));<br \/>\n      localStorage.setItem('wls_vs_php_capitals', encodeURIComponent(document.getElementById('capitals').value));<br \/>\n      document.getElementById('capitals').value='localStorage';<br \/>\n      document.getElementById('countries').value='localStorage';<br \/>\n      location.href=document.URL.split('#')[0].split('?')[0] + '?capitals=' + encodeURIComponent(document.getElementById('capitals').value) + '&countries=' + encodeURIComponent(document.getElementById('countries').value);<\/font><br \/>\n      <font color=brown>return false;<\/font><br \/>\n    <font color=purple>}<\/font><br \/>\n  }<br \/>\n  return true;<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; HTML form <i>onsubmit<\/i> event logic &#8230;<\/p>\n<ol>\n<li><font color=red>discovered no PHP web application existant<\/font> (via <a target=\"_blank\" href='https:\/\/www.rjmprogramming.com.au\/ITblog\/?s=client+pre-emptive+iframe' title='Client Pre-emptive Iframe techniques blog postings' rel=\"noopener\">Client Pre-emptive Iframe<\/a> techniques) &#8230; and &#8230;<\/li>\n<li>discovered (in a sanity check feeling way) that to go down the proposed HTML form method=GET approach was risking a &#8230;<br \/>\n<code><br \/>\n<font color=green>HTTP 414 \"Request URI too long\"<\/font><br \/>\n<\/code><br \/>\n &#8230; web browser error &#8230; and that &#8230;\n<\/li>\n<li><a target=\"_blank\" title='localStorage information from w3schools' href='https:\/\/www.w3schools.com\/jsref\/prop_win_localstorage.asp' rel=\"noopener\">localStorage<\/a> was a <font color=purple>known web browser piece of functionality<\/font><\/li>\n<p> &#8230; and so as per <font color=blue>our localStorage logic<\/font> we &#8230;<\/li>\n<li><font color=brown>back out of the default HTML form method=GET navigation setup<\/font> of the web application in favour of &#8230;\n<ul>\n<li>storing that data into localStorage<\/li>\n<li>substituting into the URL ? and &amp; arguments the hardcoding &#8220;localStorage&#8221; (and in so doing, getting back under the <font color=green>HTTP 414 &#8220;Request URI too long&#8221;<\/font> limitation, piecing together (what amounts to) &#8230;<br \/>\n      location.href=document.URL.split(&#8216;#&#8217;)[0].split(&#8216;?&#8217;)[0] + &#8216;?capitals=localStorage&#038;countries=localStorage&#8217;;<\/font>)<br \/>\n &#8230; that on a recall to this same web application a &#8230;\n<\/li>\n<li>document.body <i>onload<\/i> event piece of Javascript logic <font color=olive>checks the localStorage<\/font> for its incoming Capital City Country Report data, as per &#8230;<br \/>\n<code><br \/>\nvar phpexists=false;<br \/>\nvar getcapitals=location.search.split('capitals=')[1] ? decodeURIComponent(location.search.split('capitals=')[1].split('&')[0]).replace(\/\\+\/g,' ') : '';<br \/>\nvar getcountries=location.search.split('countries=')[1] ? decodeURIComponent(location.search.split('countries=')[1].split('&')[0]).replace(\/\\+\/g,' ') : '';<br \/>\n<br \/>\nfunction checkforreport() {<br \/>\n  var divcont='';<br \/>\n  var dcaps, dctys, idis;<br \/>\n  <font color=olive>if (getcapitals == 'localStorage') {<br \/>\n   if (window.localStorage) {<br \/>\n    getcapitals=decodeURIComponent(localStorage.getItem('wls_vs_php_capitals')).replace(\/\\+\/g,' ');<br \/>\n    <b>localStorage.removeItem('wls_vs_php_capitals');<\/b><br \/>\n   } else {<br \/>\n    getcapitals='';<br \/>\n   }<br \/>\n  }<br \/>\n  if (getcountries == 'localStorage') {<br \/>\n   if (window.localStorage) {<br \/>\n    getcountries=decodeURIComponent(localStorage.getItem('wls_vs_php_countries')).replace(\/\\+\/g,' ');<br \/>\n    if (getcapitals.replace('localStorage','') != '' && getcountries.replace('localStorage','') != '') { document.getElementById('myh1').innerHTML+=' &lt;font size=1&gt;... yes, it was needed&lt;\/font&gt;'; }<br \/>\n    <b>localStorage.removeItem('wls_vs_php_countries');<\/b><br \/>\n   } else {<br \/>\n    getcountries='';<br \/>\n   }<br \/>\n  }<\/font><br \/>\n  if (getcapitals != '' && getcountries != '') {<br \/>\n    divcont='&lt;table border=5 style=\"width:95%;vertical-align:top;background-color:white;\"&gt;&lt;tr style=background-color:#f0f0f0;\"&gt;&lt;th&gt;Capital&lt;\/th&gt;&lt;th&gt;Country&lt;\/th&gt;&lt;\/tr&gt;&lt;\/table&gt;';<br \/>\n    dcaps=getcapitals.split('|');<br \/>\n    dctys=getcountries.split('|');<br \/>\n    for (idis=0; idis&lt;dcaps.length; idis++) {<br \/>\n      divcont=divcont.replace('&lt;\/table&gt;', '&lt;tr&gt;&lt;td&gt;' + dcaps[idis] + '&lt;\/td&gt;&lt;td&gt;' + dctys[idis] + '&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;');<br \/>\n    }<br \/>\n    document.getElementById('dreport').innerHTML=divcont;<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; the <b>localStorage.removeItem()<\/b> representing that &#8220;self-destruct&#8221; nuance we were talking about before\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>We may well use this methodology in future projects, and hope it has been of some <font size=1>little<\/font> interest to you as well?!<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" title='Window LocalStorage Client Versus Server Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/window-localstorage-client-versus-server-primer-tutorial\/' rel=\"noopener\">Window LocalStorage Client Versus Server 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='#d47485' onclick='var dv=document.getElementById(\"d47485\"); 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='d47485' 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='#d47508' onclick='var dv=document.getElementById(\"d47508\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/session\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47508' 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='#d47516' onclick='var dv=document.getElementById(\"d47516\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/share\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47516' 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='#d47523' onclick='var dv=document.getElementById(\"d47523\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/canvas\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47523' 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='#d47527' onclick='var dv=document.getElementById(\"d47527\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/ajax\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47527' 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='#d47535' onclick='var dv=document.getElementById(\"d47535\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/weather\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47535' 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='#d47550' onclick='var dv=document.getElementById(\"d47550\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/glow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47550' 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='#d47562' onclick='var dv=document.getElementById(\"d47562\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/flag\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47562' 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='#d47572' onclick='var dv=document.getElementById(\"d47572\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/order\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47572' 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='#d47578' onclick='var dv=document.getElementById(\"d47578\"); 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='d47578' 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='#d47583' onclick='var dv=document.getElementById(\"d47583\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/timeline\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47583' 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='#d47592' onclick='var dv=document.getElementById(\"d47592\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/map\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d47592' 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='#d68306' onclick='var dv=document.getElementById(\"d68306\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/select\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68306' 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='#d68316' onclick='var dv=document.getElementById(\"d68316\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/multiple\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68316' 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='#d68329' onclick='var dv=document.getElementById(\"d68329\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/textarea\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68329' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Regarding yesterday&#8217;s Select Multiple Webpage Palette Primer Tutorial &#8230; you start with an outlandish premise &#8230; it stays &#8220;outlandish&#8221; select (dropdown) element wise on non-mobile &#8230; but &#8230; catering for mobile &#8230; you are forced to encase it in a &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/select-multiple-webpage-palette-popup-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[126,127,2369,281,2276,2147,342,354,367,576,590,1525,3513,652,2092,870,3434,967,997,1054,1866,1226,3889,1262,1319,1418,1433,3010],"class_list":["post-68329","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-background","tag-background-image","tag-cover","tag-css","tag-delimitation","tag-delimiter","tag-div","tag-dom","tag-dropdown","tag-html","tag-image","tag-innerhtml","tag-interactive-input","tag-javascript","tag-multiple","tag-onload","tag-palette","tag-popup","tag-programming","tag-report","tag-select","tag-svg","tag-svgxml","tag-textarea","tag-tutorial","tag-webpage","tag-window-open","tag-window-opener"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68329"}],"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=68329"}],"version-history":[{"count":22,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68329\/revisions"}],"predecessor-version":[{"id":68352,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68329\/revisions\/68352"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=68329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=68329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=68329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}