{"id":15572,"date":"2015-06-24T05:01:42","date_gmt":"2015-06-23T19:01:42","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=15572"},"modified":"2017-10-04T11:56:40","modified_gmt":"2017-10-04T01:56:40","slug":"australian-indigenous-language-image-map-checkbox-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-checkbox-tutorial\/","title":{"rendered":"Australian Indigenous Language Image Map Checkbox Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Australian Indigenous Language Image Map Checkbox Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/indigenouslanguagescb.jpg\" title=\"Australian Indigenous Language Image Map Checkbox Tutorial\"  style=\"float:left;\" id='icb' onmouseover=\" this.src=this.src.replace('.jpg', '.xgif').replace('.gif', '.xjpg').replace('.x', '.');  \"  \/><\/a><p class=\"wp-caption-text\">Australian Indigenous Language Image Map Checkbox Tutorial<\/p><\/div>\n<p>Like yesterday, today we mix geography and history in an image <a target=_blank title='HTML map element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_map.asp'>map<\/a> web application exploring Indigenous Australian Language, History and Culture, <a target=_blank title='the oldest surviving culture in the world' href='http:\/\/www.aboriginalculture.com.au\/'>&#8220;the oldest surviving culture in the world&#8221;<\/a>.  Today&#8217;s tutorial, extending on yesterday&#8217;s <a href='#ailimdt' title='Australian Indigenous Language Image Map Dropdown Tutorial'>Australian Indigenous Language Image Map Dropdown Tutorial<\/a> continues the Javascript DOM methodology, and shows the use of checkboxes.<\/p>\n<p>The HTML input tag&#8217;s <a target=_blank title='HTML input tag type checkbox information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/dom_obj_checkbox.asp'>checkbox<\/a> type is a &#8220;binary&#8221; decision maker, boiling down to a yes\/no (or true\/false) decision on something.  A related HTML input tag type is called the radio button, which allows two or more choices, only one of which can be yes (or true).  Checkboxes are more independent than <a target=_blank title='HTML input tag type radio button information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/dom_obj_radio.asp'>radio buttons<\/a>, and perhaps more generically useful in that respect.  However, if stringency and transparency of purpose is what you are after, a radio button leaves no doubt as to interpretation for the user, usually, because the element can only highlight at most one option.<\/p>\n<p>Our checkboxes today are for &#8230;<\/p>\n<ol>\n<li>Images (will result in Google Image Search)<\/li>\n<li>Videos (will result in Google Video Search (if no Image Searching is happening))<\/li>\n<li>Map (will additionally result in popup window of Google Map Chart (see also <a target=_blank title='PHP\/Javascript\/HTML Google Chart Map Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=4832'>PHP\/Javascript\/HTML Google Chart Map Tutorial<\/a>) of the tribal area)<\/li>\n<\/ol>\n<p>As you can see, there is more complication here that a radio button, on its own, cannot resolve.<\/p>\n<p>Just reviewing how we got here &#8230; we established a &#8220;MobileFish&#8221; inspired HTML map element scenario with the following components &#8230;<\/p>\n<ul>\n<li>a brilliant piece of research from the University of Western Sydney and ending up on the <a target=_blank href='http:\/\/treatyrepublic.net'>TreatyRepublic.net<\/a> website as a map image &#8230; thanks<\/li>\n<li>using the wonderful <a target=_blank title='MobileFish imape map creator helper ... thanks' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>MobileFish<\/a> image map (HTML element) creator helper &#8230; thanks<\/li>\n<\/ul>\n<p>From there we&#8217;ve been developing external Javascript to allow a dropdown and checkboxes, with minimal change to that originally written HTML, and without resorting to PHP usage.<\/p>\n<p>So please take a look at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/\" title='Click picture'>live run<\/a> (HTML source code (you could call) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.html-GETME\" title='aboriginal_language_regions.html'>aboriginal_language_regions.html<\/a> unchanged from yesterday, and calling on the external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.js-GETME\" title='aboriginal_language_regions.js'>aboriginal_language_regions.js<\/a> changed as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.js-GETME\" title='aboriginal_language_regions.js'>this link<\/a> from yesterday) where we add those three new checkbox elements to refine our Google Search information, and add &#8220;map&#8221; functionality via Google Map Chart.<\/p>\n<hr>\n<p id='ailimdt'>Previous relevant <a target=_blank title='Australian Indigenous Language Image Map Dropdown Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-dropdown-tutorial\/'>Australian Indigenous Language Image Map Dropdown 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\/ImageMap\/Languages\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Australian Indigenous Language Image Map Dropdown Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/indigenouslanguagesmore.jpg\" title=\"Australian Indigenous Language Image Map Dropdown Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Australian Indigenous Language Image Map Dropdown Tutorial<\/p><\/div>\n<p>Today we mix geography and history in an image <a target=_blank title='HTML map element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_map.asp'>map<\/a> web application exploring Indigenous Australian Language, History and Culture.  We&#8217;ll be devoting a blog posting to the subject in the future, but today&#8217;s tutorial, extending on yesterday&#8217;s <a href='#ailimpt' title='Australian Indigenous Language Image Map Primer Tutorial'>Australian Indigenous Language Image Map Primer Tutorial<\/a> and its promise of more Javascript DOM functionality to follow, uses a Javascript DOM technique we term here, the &#8220;Javascript DOM Big Changes&#8221; technique, which is the idea of manipulating &#8220;document.body.innerHTML&#8221; as a whole.<\/p>\n<p>This technique of manipulating &#8220;document.body.innerHTML&#8221; as a whole is all fine to do, but you should remember with it that values the user has set, since, with dropdown selection, for instance, need to be taken into account, as a separate stage afterwards, with this method &#8230; you&#8217;ll see what we mean &#8230;<\/p>\n<p>www.aboriginalculture.com.au\/introduction.shtmlIntroduction to Australia&#8217;s Aboriginal Culture by David M. Welch. &#8230; Aboriginal culture probably represents the oldest surviving culture in the world<\/p>\n<p><code><br \/>\nfunction selchange(osel) {<br \/>\n  var ov=osel.value;<br \/>\n  var oi=osel.id;<br \/>\n  document.body.innerHTML = document.body.innerHTML.replace(\/\" target=\"_blank\"\/g, \"+'\" + ov.replace(\/ \/g, \"%20\") + \"'\" + '\" target=\"_blank\"');<br \/>\n  document.getElementById(oi).value = ov;<br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; in code above, for the dropdown&#8217;s &#8220;onchange&#8221; event logic &#8230; or by trying your own scenarios &#8230; which am 100% certain you&#8217;ll be beavering away at within minutes of reading today&#8217;s offering?!<\/p>\n<p>Is the &#8220;document.body.innerHTML&#8221; a refresh?  It sort of acts like one, but it is more as well, because you have your own logic controls over what gets &#8220;refreshed into&#8221; &#8230; something a little more comfortable, perhaps?!<\/p>\n<p>Now, back to the real world purpose of this technique.  Yesterday we established a &#8220;MobileFish&#8221; inspired HTML map element scenario with the following components &#8230;<\/p>\n<ul>\n<li>a brilliant piece of research from the University of Western Sydney and ending up on the <a target=_blank href='http:\/\/treatyrepublic.net'>TreatyRepublic.net<\/a> website as a map image &#8230; thanks<\/li>\n<li>using the wonderful <a target=_blank title='MobileFish imape map creator helper ... thanks' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>MobileFish<\/a> image map (HTML element) creator helper &#8230; thanks<\/li>\n<\/ul>\n<p> &#8230; so now we virtually leave that HTML intact and only mildly changed, and do not use PHP, no matter how tempting that is for me to do, and use Javascript on that existant HTML (which, by the way, will eventually be fleshed out to avoid &#8216;Under construction&#8217; messages, eventually) to perform significant functional improvements.  This Javascript is external Javascript, hence the minimalist approach to changes to the HTML.<\/p>\n<p>So take a look at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/\" title='Click picture'>live run<\/a> (HTML source code (you could call) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.html-GETME\" title='aboriginal_language_regions.html'>aboriginal_language_regions.html<\/a> changed as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.html-GETME\" title='aboriginal_language_regions.html'>this link<\/a> from yesterday, and calling on the external Javascript <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.js_GETME\" title='aboriginal_language_regions.js'>aboriginal_language_regions.js<\/a>) where we add the dropdown HTML select element at the top to refine our Google Search information.<\/p>\n<hr>\n<p id='ailimpt'>Previous relevant <a target=_blank title='Australian Indigenous Language Image Map Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-primer-tutorial\/'>Australian Indigenous Language Image Map 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\/ImageMap\/Languages\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Australian Indigenous Language Image Map Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/indigenouslanguagemap.jpg\" title=\"Australian Indigenous Language Image Map Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Australian Indigenous Language Image Map Primer Tutorial<\/p><\/div>\n<p>We want to show more ideas with Javascript DOM and the HTML <a target=_blank title='HTML map element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_map.asp'>map<\/a> element over coming days.<\/p>\n<p>The HTML map element is a very useful way to combine a graphical image with web functionality, by turning that image into a clickable, by region, entity.<\/p>\n<p>For the theme of work over the next few days we combine history and geography.  Remember at school that history and geography were choices at a certain stage of schooling, but today, we try to use geography to foster an interest in history &#8230; after all, where we live is really important to how history pans out for society.<\/p>\n<p>Was inspired by a story of a several meter high atlas that is currently on display in our New South Wales library &#8230; and it takes two people to turn a page, else the weight of the page will tear it with only one person turning.<\/p>\n<p>This thought of maps combined with me with a story about how diverse and interesting our Australian Indigenous Languages are here in Australia.  There are hundreds of languages involved in Australia&#8217;s history, though we often only think of English &#8230; so take a look at today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/\" title='Click picture'>live run<\/a> (HTML source code (you could call) <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/aboriginal_language_regions.html_GETME\" title='aboriginal_language_regions.html'>aboriginal_language_regions.html<\/a>) where we show &#8230;<\/p>\n<ul>\n<li>a brilliant piece of research from the University of Western Sydney and ending up on the <a target=_blank href='http:\/\/treatyrepublic.net'>TreatyRepublic.net<\/a> website as a map image &#8230; thanks<\/li>\n<li>using the wonderful <a target=_blank title='MobileFish imape map creator helper ... thanks' href='http:\/\/www.mobilefish.com\/services\/image_map\/image_map.php'>MobileFish<\/a> image map (HTML element) creator helper &#8230; thanks<\/li>\n<\/ul>\n<p> &#8230; to set up that initial additional &#8220;onclick&#8221; intelligence that takes you to some Google search engine opportunities to link a region of Australia with an indigenous tribe (and its language), as a first step in the functionality we develop over time.<\/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='#d15539' onclick='var dv=document.getElementById(\"d15539\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=HTML\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d15539' 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='#d15564' onclick='var dv=document.getElementById(\"d15564\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=DOM\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d15564' 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='#d15572' onclick='var dv=document.getElementById(\"d15572\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d15572' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Like yesterday, today we mix geography and history in an image map web application exploring Indigenous Australian Language, History and Culture, &#8220;the oldest surviving culture in the world&#8221;. Today&#8217;s tutorial, extending on yesterday&#8217;s Australian Indigenous Language Image Map Dropdown Tutorial &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-checkbox-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[174,202,354,513,518,576,609,652,997,1597,1024,1319],"class_list":["post-15572","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-button","tag-checkbox","tag-dom","tag-google","tag-google-chart","tag-html","tag-input","tag-javascript","tag-programming","tag-radio","tag-radio-button","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15572"}],"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=15572"}],"version-history":[{"count":11,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15572\/revisions"}],"predecessor-version":[{"id":33474,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15572\/revisions\/33474"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=15572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=15572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=15572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}