{"id":18965,"date":"2016-01-07T02:01:43","date_gmt":"2016-01-06T16:01:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=18965"},"modified":"2016-01-06T17:10:52","modified_gmt":"2016-01-06T07:10:52","slug":"htmljavascript-clairvoyance-tester-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-clairvoyance-tester-primer-tutorial\/","title":{"rendered":"HTML\/Javascript Clairvoyance Tester Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clairvoyance.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"The Three P Three Modes Calling Card Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clairvoyance_tester.jpg\" title=\"HTML\/Javascript Clairvoyance Tester Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Clairvoyance Tester Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s HTML and Javascript web application is a Clairvoyance Tester, but then I don&#8217;t have to tell you you&#8217;re clairvoyant, because you just knew I was going to say it anyway &#8230; <font size=1>as you knew that this blog posting was coming out today<\/font>.<\/p>\n<p>We wrote it to illustrate the good use a &#8230;<\/p>\n<p><code><br \/>\n&lt;body style=\"background-color: yellow;background: url('clairvoyance.jpg') repeat;background-position:10px 200px; \"&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; background image can be put to, in conjunction with our <i>document.write(prompt())<\/i> scenario that makes a web application feel a little like those interactive command line desktop applications in the <a target=_blank title='Yep, there is a YouTube clip!' href='https:\/\/www.youtube.com\/watch?v=d-Fi9T_u1f0'>days of yore<\/a>, because when you have a web application launching straight into things, it can be a bit offputting to be asked something before being shown something, in these times outside the <a target=_blank title='Yep, there is a YouTube clip!' href='https:\/\/www.youtube.com\/watch?v=d-Fi9T_u1f0'>days of yore<\/a>.<\/p>\n<p>And yes, we tried once again for a better CSS solution using a fully opaque background image (<a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=bIV4KLCmJ98'><i>and we haven&#8217;t given up<\/i><\/a>) and got some semi-okay ideas going, but decided in the end to do the more straightforward approach of using the wonderful, marvellous, Gimp image editor to give the background image about <a id='o50' href='#o50' onclick=\" document.getElementById('im50').style.display='inline'; \">50% opacity<\/a><img id='im50' style='display:none;' src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clairvoyance.jpg'><\/img>, since it is so easy to do in Gimp (as we show with <a target=_blank title='Gimp Transparency Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-transparency-primer-tutorial\/'>Gimp Transparency Primer Tutorial<\/a>).<\/p>\n<p>There was another CSS idea we tried for the first time with this too.  While trying all the incarnations, as mentioned above, what was good to do, whether you are succeeding with &#8220;opacity difference&#8221; (between background and foreground) or not, is to place a very thick border of a different colour (we chose white) as a &#8220;buffer zone&#8221; between the background and foreground as per (our HTML for the major foreground HTML element of interest) &#8230;<\/p>\n<p><code><br \/>\n&lt;table id=\"mytable\" style=\"background-color:white;opacity:1.0; border: 125px solid white;\"&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; which could have been enough to make it all work, even without &#8230;<\/p>\n<ul>\n<li><a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=bIV4KLCmJ98'><i>Semi opaque HTML body element (or even an HTML div element) overlayed on a fully opaque foregound<\/i><\/a> &#8230; we left off the &#8220;quest&#8221; <a target=_blank title='The quest' href='http:\/\/www.w3schools.com\/cssref\/pr_background-position.asp'>here<\/a><\/li>\n<li><a target=_blank title='Gimp Transparency Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/gimp-transparency-primer-tutorial\/'>Gimp transparency magic<\/a><\/li>\n<\/ul>\n<p>So we&#8217;ll leave you with the HTML and Javascript source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clairvoyance.html_GETME\" title='clairvoyance.html'>???<\/a> (as if you needed to know) and (as if you need to have) a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/clairvoyance.html\">live run<\/a> &#8230; <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA'>anyone, anyone?<\/a> &#8230; <font size=1>link<\/font>.<\/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='#d18965' onclick='var dv=document.getElementById(\"d18965\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/css\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d18965' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s HTML and Javascript web application is a Clairvoyance Tester, but then I don&#8217;t have to tell you you&#8217;re clairvoyant, because you just knew I was going to say it anyway &#8230; as you knew that this blog posting was &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-clairvoyance-tester-primer-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,16,37],"tags":[127,281,491,576,652,997,1319],"class_list":["post-18965","post","type-post","status-publish","format-standard","hentry","category-elearning","category-gimp","category-tutorials","tag-background-image","tag-css","tag-gimp","tag-html","tag-javascript","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18965"}],"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=18965"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18965\/revisions"}],"predecessor-version":[{"id":18970,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18965\/revisions\/18970"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=18965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=18965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=18965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}