{"id":60398,"date":"2023-08-13T03:01:07","date_gmt":"2023-08-12T17:01:07","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=60398"},"modified":"2023-08-12T21:59:39","modified_gmt":"2023-08-12T11:59:39","slug":"event-calendar-new-window-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/event-calendar-new-window-tutorial\/","title":{"rendered":"Event Calendar New Window Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Event Calendar New Window Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month_new_window.jpg\" title=\"Event Calendar New Window Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Event Calendar New Window Tutorial<\/p><\/div>\n<p>Onto yesterday&#8217;s <a title='Event Calendar Remembered Tutorial' href='#ecrt'>Event Calendar Remembered Tutorial<\/a>&#8216;s <font size=3>&#8220;Mystery Dilemma&#8221;<\/font> &#8230;<\/p>\n<blockquote><p>\nBut, there&#8217;s an inherent weakness with the design, we&#8217;ll go into more into the future.\n<\/p><\/blockquote>\n<p> &#8230; well &#8230; it&#8217;s a perennial for us, regarding how if you stick with clientside thinking, only, web applications, when the amount of data to remember starts adding up, the &#8220;get arguments approach&#8221; ( ie. use ? and &#038; arguments at the address bar ) is restricted by length restrictions regarding URL lengths.<\/p>\n<p>Rather than jump to PHP serverside ideas just yet, we wanted to show some more ideas, staying with &#8220;clientside only thinking&#8221;, today, as well as improving the UX (<a target=_blank title='UX information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/User_experience'>user experience<\/a>) and small steps forward regarding styling.<\/p>\n<p>Okay then, regarding the idea to remember an Event in Month form, when there is a lot of data, and staying &#8220;just clientside&#8221;, we&#8217;ve coded for a &#8220;New Window&#8221; idea, albeit not as memorable as the default &#8220;Remember in Bookmark&#8221; possible for your smaller datasets.  However, in saying that, we found that within this new window, with our Google Chrome web browser, we could &#8230;<\/p>\n<ol style='text-shadow:-1px 1px 1px #ff2d95;background:linear-gradient(rgba(255,255,255,0.3),rgba(255,255,255,0.3)),URL(\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month_new_window_oh.jpg);background-size:contain;'>\n<li>bring up Context Menu with a right click or two finger gesture within the popup window webpage content &#8230;<\/li>\n<li>pick Inspect option &#8230;\n<\/li>\n<li>be in Elements tab of your Web Inspector &#8230; and &#8230;\n<\/li>\n<li>highlight top &lt;html&gt; tag &#8230;\n<\/li>\n<li>Context Menu with a right click or two finger gesture &#8230;\n<\/li>\n<li>pick Copy -&gt; Copy outerHTML &#8230; so that &#8230;\n<\/li>\n<li>your Event Calendar for your Events in Month choice is in a text buffer &#8230; ready for you to &#8230;\n<\/li>\n<li>Paste into a Text Editor that Events in Month webpage to store <font size=1>(perhaps in a <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a> local Apache\/PHP\/mySql web server environment, where you can further look at and develop your own ideas)<\/font>\n<p><\/li>\n<\/ol>\n<p>The user is told when the switch to &#8220;New Window&#8221; compromise becomes active, decided upon by reconstructing the proposed address bar URL regularly and when too long &#8230;<\/p>\n<p><code><br \/>\n  function formanalyze() {<br \/>\n    var fio=document.getElementsByTagName('form')[0];<br \/>\n    var delm='?';<br \/>\n    var fioih=fio.innerHTML;<br \/>\n    var fions=fioih.split(' name=\"');<br \/>\n    var testurl=documentURL.split('?')[0].split('#')[0];<br \/>\n    for (var ijk=1; ijk&lt;fions.length; ijk++) {<br \/>\n          testurl+=delm + fions[ijk].split('\"')[0] + '=' + encodeURIComponent(document.getElementById(fions[ijk].split('\"')[0]).value);<br \/>\n          delm='&';<br \/>\n    }<br \/>\n    setTimeout(formanalyze, 3000);<br \/>\n    if (eval('' + testurl.length) &gt;= 750) {<br \/>\n      if (document.getElementById('remember')) { document.getElementById('remember').value='New window';   }<br \/>\n      if (document.getElementById('rememberme')) { document.getElementById('rememberme').value='New window';   }<br \/>\n      if (document.getElementById('remembermoi')) { document.getElementById('remembermoi').value='New window';   }<br \/>\n    } else {<br \/>\n      if (document.getElementById('remember')) { document.getElementById('remember').value=document.getElementById('remember').value.replace(\/^Remember$\/g, 'Remember via Bookmark');   }<br \/>\n      if (document.getElementById('rememberme')) { document.getElementById('rememberme').value=document.getElementById('rememberme').value.replace(\/^Remember$\/g, 'Remember via Bookmark');   }<br \/>\n      if (document.getElementById('remembermoi')) { document.getElementById('remembermoi').value=document.getElementById('remembermoi').value.replace(\/^Remember$\/g, 'Remember via Bookmark');   }<br \/>\n    }<br \/>\n    return eval('' + testurl.length);<br \/>\n  }<br \/>\n<\/code><\/p>\n<p> &#8230; the form submit buttons are reworded accordingly.<\/p>\n<p>Another idea from this blog thread&#8217;s inspiration &#8230;<\/p>\n<p><img src='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.jpg' style='width:100%;'><\/img><\/p>\n<p> &#8230; we&#8217;ve now addressed in today&#8217;s &#8220;second draft&#8221; is allowing for an optional bold Event Day <font size=1>Blurb<\/font> Title, available to the user via a new dropdown &#8220;Bold Title&#8221; option.<\/p>\n<p>And, how can we do more with colour, to help the right bits stand out, and be consistent?  We thought &#8230;<\/p>\n<ul>\n<li>text shadow means by which the text of Event Calendar <font color=blue>can be more impactive<\/font> &#8230;<br \/>\n<code><br \/>\n&lt;div style=\"text-shadow:-1px 1px 1px #ff2d95;\" id=eventcalendar&gt;&lt;\/div&gt;<br \/>\n<\/code>\n<\/li>\n<li>dropdown element <font color=purple>conditional<\/font> <font color=blue>styling<\/font> &#8230;<br \/>\n<code><br \/>\n&lt;style&gt;<br \/>\n .dayb {<br \/>\n   color: white;<br \/>\n   background-color: red;<br \/>\n   padding: 5 5 5 5;<br \/>\n }<br \/>\n<br \/> <br \/>\n .dow {<br \/>\n   color: purple;<br \/>\n   font-style: bold;<br \/>\n }<br \/>\n <br \/>\n .selday {<br \/>\n   margin-left: 8px;<br \/>\n   <font color=blue>background-color: rgba(255,0,0,0.7);<\/font><br \/>\n   display: inline-block;<br \/>\n   width: 50px;<br \/>\n }<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><br \/>\n &#8230;<br \/>\n<code><br \/>\n          if (thislabel.substring(0,1) == 'i') {<br \/>\n             if (thisval.trim() != '') {<br \/>\n               <font color=purple>document.getElementById(thislabel.replace('i', 'sel')).style.color='white';<br \/>\n               document.getElementById(thislabel.replace('i', 'sel')).style.backgroundColor='red';<\/font><br \/>\n               }<br \/>\n               document.getElementById(thislabel.replace('i', 'opt')).innerText=thisval.replace(\/\\+\/g, ' ').replace(\/\\ \\ \\ \/g, ' + '); \/\/.replace(\/\\+$\/g, ' ');<br \/>\n               document.getElementById(thislabel).value=thisval.replace(\/\\+$\/g, ' ');<br \/>\n             } else {<br \/>\n               document.getElementById(thislabel).value=thisval.replace(\/\\+\/g, ' ').replace(\/\\ \\ \\ \/g, ' + ');<br \/>\n             }<br \/>\n          }<br \/>\n<\/code>\n<\/li>\n<li>placeholder on Blurb <font color=purple>conditional existence<\/font> &#8230;<br \/>\n<code><br \/>\n     <font color=purple>var ourdata='';<\/font><br \/>\n\/\/ ...<br \/>\n     if (documentURL.indexOf('?') != -1) {<br \/>\n       <font color=purple>if (documentURL.indexOf('?caltitle=') != -1) { ourdata='data-'; }<\/font><br \/>\n\/\/ ...<br \/>\n       trtemplate='&lt;tr id=tr01.00&gt;&lt;td style=width:22%;&gt;&lt;span id=sone01.00 class=dow&gt;' + dotw[adate.getDay()].toUpperCase().substring(0,3) + '&lt;\/span&gt;&lt;br&gt;&lt;br&gt;&lt;span id=stwo01.00 class=dayb&gt;1&lt;span onblur=sepit(this); contenteditable=true id=sp01.00&gt;&lt;\/span&gt;&lt;input type=hidden id=i01.00 name=i01.00 value=\"\"&gt;&lt;\/input&gt;&lt;select data-dow=' + dotw[adate.getDay()].toUpperCase().substring(0,3) + ' class=selday onchange=\"selit(this);\" id=sel01.00&gt;&lt;option id=opt01.00 value=\"\"&gt;&lt;\/option&gt;&lt;option title=\"All such in month (ie. weekly)\" value=\"...\"&gt;...&lt;\/option&gt;&lt;option title=\"And ...\" value=\"&...\"&gt;&&lt;\/option&gt;&lt;option value=Bold&gt;Bold Title&lt;\/option&gt;&lt;option value=Clone&gt;Clone&lt;\/option&gt;&lt;\/select&gt;&lt;\/span&gt;&lt;\/td&gt;&lt;td class=blurb title=\"What is on?\" id=tb01.00&gt;&lt;span title=\"Event title\" style=\"font-style:bold;color:blue;\" id=bd01.00&gt;&lt;\/span&gt;&lt;textarea name=ta01.00 id=ta01.00 style=\"width:100%;height=100%;\" <font color=purple>' + ourdata + '<\/font>placeholder=\"Blurb ...\" class=tablurb&gt;&lt;\/textarea&gt;&lt;\/td&gt;&lt;\/tr&gt;';<br \/>\n\/\/ ...<br \/>\n       }<br \/>\n\/\/ ...<br \/>\n     }<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; for our <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html-GETME\">&#8220;second draft&#8221;<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html-GETME\">events_in_month.htm<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.htm\">Events in Month web application<\/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\/event-calendar-new-window-tutorial\/'>Event Calendar New Window Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ecrt'>Previous relevant <a target=_blank title='Event Calendar Remembered Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/event-calendar-remembered-tutorial\/'>Event Calendar Remembered Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html?old=y\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Event Calendar Remembered Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/event_calendar.gif\" title=\"Event Calendar Remembered Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Event Calendar Remembered Tutorial<\/p><\/div>\n<p>We were inspired by an Event Calendar pamplette we saw the other day &#8230;<\/p>\n<p><img src='https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.jpg' style='width:100%;'><\/img><\/p>\n<p> &#8230; to write a new <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html_GETME\">&#8220;proof of concept&#8221;<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html?old=y\">Events in Month web application<\/a>, whose content can be recalled via the web browser&#8217;s Bookmark methodologies.<\/p>\n<p>We liked the ideas for day of week and\/or date of month grouping arrangements we included, being, the way we interpreted it &#8230;<\/p>\n<ul>\n<li>just on this day in this month &#8230; <i>default<\/i><\/li>\n<li>on this day of the week throughout the month in question &#8230; &#8220;<i>&#8230;<\/i>&#8220;<\/li>\n<li>on this day and some others in that month in question &#8230; &#8220;<i>&#038;<\/i>&#8221; &#8230; to start with and further amendments available via contenteditable=true span element<\/li>\n<li>&#8220;Clone&#8221; value allows for multiple separated &#8220;blurbs&#8221; for the one signature day<\/li>\n<\/ul>\n<p>But, there&#8217;s an inherent weakness with the design, we&#8217;ll go into more into the future.  For now, you can try it yourself below &#8230;<\/p>\n<p><iframe src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.html?old=y\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p><b><i>Stop Press<\/i><\/b><\/p>\n<p>This is where we get to for a &#8220;second draft&#8221; we&#8217;ll get into, further, tomorrow &#8230;<\/p>\n<p><iframe src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/events_in_month.htm\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d60392' onclick='var dv=document.getElementById(\"d60392\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/calendar\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60392' 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='#d60398' onclick='var dv=document.getElementById(\"d60398\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/window\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60398' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Onto yesterday&#8217;s Event Calendar Remembered Tutorial&#8216;s &#8220;Mystery Dilemma&#8221; &#8230; But, there&#8217;s an inherent weakness with the design, we&#8217;ll go into more into the future. &#8230; well &#8230; it&#8217;s a perennial for us, regarding how if you stick with clientside thinking, &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/event-calendar-new-window-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":[3147,2541,180,224,301,3667,3668,367,400,576,652,4433,2643,997,1866,2263,1200,1209,1212,1238,2567,2167,1319,1350,1356,1583],"class_list":["post-60398","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-bold","tag-bookmark","tag-calendar","tag-colour","tag-date","tag-day","tag-day-of-week","tag-dropdown","tag-event","tag-html","tag-javascript","tag-month","tag-placeholder","tag-programming","tag-select","tag-span","tag-stop-press","tag-style","tag-styling","tag-table","tag-text-shadow","tag-title","tag-tutorial","tag-user-experience","tag-ux","tag-window"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60398"}],"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=60398"}],"version-history":[{"count":29,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60398\/revisions"}],"predecessor-version":[{"id":60432,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60398\/revisions\/60432"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=60398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=60398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=60398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}