{"id":15564,"date":"2015-06-23T05:01:43","date_gmt":"2015-06-22T19:01:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=15564"},"modified":"2015-10-13T09:51:12","modified_gmt":"2015-10-12T23:51:12","slug":"australian-indigenous-language-image-map-dropdown-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-dropdown-tutorial\/","title":{"rendered":"Australian Indigenous Language Image Map Dropdown 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 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><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","protected":false},"excerpt":{"rendered":"<p>Today we mix geography and history in an image map 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 Australian Indigenous Language &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/australian-indigenous-language-image-map-dropdown-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":[1596,354,367,401,576,590,652,745,861,997,1319],"class_list":["post-15564","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-document-body-innerhtml","tag-dom","tag-dropdown","tag-event-driven","tag-html","tag-image","tag-javascript","tag-map","tag-onclick","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15564"}],"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=15564"}],"version-history":[{"count":2,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15564\/revisions"}],"predecessor-version":[{"id":15566,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/15564\/revisions\/15566"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=15564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=15564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=15564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}