{"id":60383,"date":"2023-08-10T03:01:45","date_gmt":"2023-08-09T17:01:45","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=60383"},"modified":"2023-08-09T11:44:35","modified_gmt":"2023-08-09T01:44:35","slug":"drag-and-drop-three-dimensional-look-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/drag-and-drop-three-dimensional-look-tutorial\/","title":{"rendered":"Drag and Drop Three Dimensional Look Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Drag and Drop Three Dimensional Look Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/ImageMap\/Languages\/drag_and_drop_text_shadow.jpg\" title=\"Drag and Drop Three Dimensional Look Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Drag and Drop Three Dimensional Look Tutorial<\/p><\/div>\n<p>So far with our latest Drag and Drop work, further to that of <a title='Drag and Drop via Hotlinked External Javascript Tutorial' href='#ddhejt'>Drag and Drop via Hotlinked External Javascript Tutorial<\/a> below, we&#8217;ve concentrated on Javascript.  So, you&#8217;d think it would be CSS&#8217;s time for attention?!  Well, sort of.  We like to do a lot of CSS styling via Javascript DOM like (today&#8217;s <font color=blue>simple intervention<\/font> to add a Three Dimensional look to our drag<subee<\/sub> via CSS property <a target=_blank title='CSS text-shadow property' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_text-shadow.php'>text-shadow<\/a>) &#8230;<\/p>\n<p><code><br \/>\n  window.addEventListener(\"DOMContentLoaded\", () => {<br \/>\n  gelo=wod('body');<br \/>\nconst source = document.querySelector(\"#mg\");<br \/>\nif (source.title.indexOf('ong drag') == -1 && !classo) {<br \/>\n   source.title+=' ... long drag (eg. more than 10 seconds) also opens a Google Maps webpage ... very long drag (eg. more than 20 seconds) also opens a Google Earth webpage';<br \/>\n}<br \/>\n<font color=blue><br \/>\nif (source) {<br \/>\n    if (source.outerHTML.indexOf('text-shadow:') == -1) {<br \/>\n      source.style.textShadow='-1px 1px 3px #952dff';<br \/>\n    }<br \/>\n}<br \/>\n<\/font><br \/>\nif (noyes == noyes.toUpperCase()) {<br \/>\n  source.style.border='1px dashed pink';<br \/>\n}<br \/>\nconsole.log('source.id=' + source.id);<br \/>\nsource.addEventListener(\"dragstart\", (ev) => {<br \/>\n  var elo=null;<br \/>\n  dragdt=(new Date());<br \/>\n\/\/ more code follows<br \/>\n});<br \/>\nsource.addEventListener(\"dragend\", (ev) =><br \/>\n  ev.target.classList.remove(\"dragging\")<br \/>\n);<br \/>\n<\/code><\/p>\n<p>That&#8217;s it!  Guess this is the joy of involving genericized external Javascript, because this <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.js--------GETME\">simple change to<\/a> our external Javascript <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.js--------GETME\">countries.js<\/a> &#8220;Drag and Drop specialist&#8221; has affected <font size=1>(the look of)<\/font> about five web applications, so far, calling it &#8230; one per codeline!<\/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\/drag-and-drop-three-dimensional-look-tutorial\/'>Drag and Drop Three Dimensional Look Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ddhejt'>Previous relevant <a target=_blank title='Drag and Drop via Hotlinked External Javascript Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/drag-and-drop-via-hotlinked-external-javascript-tutorial\/'>Drag and Drop via Hotlinked External Javascript 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\/draganddrop_hotwiring.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Drag and Drop via Hotlinked External Javascript Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/drag_and_drop_hotwiring_external_javascript.gif\" title=\"Drag and Drop via Hotlinked External Javascript Tutorial\" style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Drag and Drop via Hotlinked External Javascript Tutorial<\/p><\/div>\n<p>There are three very useful <a target=_blank title='Inline linking information from Wikipedia ... thanks'  href='https:\/\/en.wikipedia.org\/wiki\/Inline_linking'>&#8220;hotwiring&#8221;<\/a> ideas that usually work with your web applications &#8230;<\/p>\n<ul>\n<li>via absolute image URLs<\/li>\n<li>via absolute stylesheet URLs<\/li>\n<li>via absolute <font size=1>external<\/font> Javascript URLs<\/li>\n<\/ul>\n<p> &#8230; and that last one is what we want to hone in regarding, with an idea we had to allow a user to &#8230;<\/p>\n<ul>\n<li>write their own HTML (and derived Javascript) via a textarea element with initial template HTML code<\/li>\n<li>construct a personalized HTML webpage after the light green submit button press &#8230; so that &#8230;<\/li>\n<li>downloading the HTML is possible via &#8220;View Page Source&#8221; (context option) and Copy\/Paste into a text editor <font size=1>(and then, perhaps, onto local system web server environment development via an Apache\/PHP\/MySql local web server product such as <a target=_blank title='MAMP' href='http:\/\/www.mamp.info'>MAMP<\/a>)<\/font><\/li>\n<\/ul>\n<p>In order to allow this more generic approach <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.js-----GETME\">we made changes<\/a> to our external Javascript <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/countries.js-----GETME\">countries.js<\/a> &#8220;Drag and Drop specialist&#8221; use by our <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/draganddrop_hotwiring.php_GETME\">&#8220;first draft proof of concept&#8221;<\/a> <a target=_blank href=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/draganddrop_hotwiring.php\">PHP draganddrop_hotwiring.php web application<\/a> you can try below <font size=1>(where a context option like &#8220;View Frame Source&#8221; might more be the go regarding downloading your HTML invention)<\/font> &#8230;<\/p>\n<p><iframe src=\"https:\/\/www.rjmprogramming.com.au\/HTMLCSS\/draganddrop_hotwiring.php?rand=7658765\" 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='#d60328' onclick='var dv=document.getElementById(\"d60328\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/external-javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60328' 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='#d60383' onclick='var dv=document.getElementById(\"d60383\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/text-shadow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d60383' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>So far with our latest Drag and Drop work, further to that of Drag and Drop via Hotlinked External Javascript Tutorial below, we&#8217;ve concentrated on Javascript. So, you&#8217;d think it would be CSS&#8217;s time for attention?! Well, sort of. We &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/drag-and-drop-three-dimensional-look-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":[2824,52,2525,281,360,2237,364,4385,385,409,452,2537,1839,1664,3081,4430,4431,576,587,652,714,744,861,1919,3267,2411,932,997,1105,1209,1212,2567,1262,4166,1319,1345,1891,1721,1418],"class_list":["post-60383","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-absolute","tag-absolute-url","tag-child","tag-css","tag-download","tag-drag","tag-drag-and-drop","tag-drop","tag-emoji","tag-external-javascript","tag-form","tag-generic","tag-genericization","tag-global","tag-global-variable","tag-hotwire","tag-hotwiring","tag-html","tag-iframe","tag-javascript","tag-local-web-server","tag-mamp","tag-onclick","tag-onmousedown","tag-ontouchdown","tag-parent","tag-php","tag-programming","tag-script","tag-style","tag-styling","tag-text-shadow","tag-textarea","tag-three-dimensional","tag-tutorial","tag-url","tag-user","tag-variable","tag-webpage"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60383"}],"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=60383"}],"version-history":[{"count":8,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60383\/revisions"}],"predecessor-version":[{"id":60391,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/60383\/revisions\/60391"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=60383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=60383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=60383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}