{"id":6839,"date":"2014-03-19T05:02:20","date_gmt":"2014-03-18T18:02:20","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=6839"},"modified":"2014-03-19T05:02:20","modified_gmt":"2014-03-18T18:02:20","slug":"javascript-prototype-library-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-prototype-library-primer-tutorial\/","title":{"rendered":"Javascript Prototype Library Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Prototype\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Javascript Prototype Library Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Prototype\/Javascript_Prototype.jpg\" title=\"Javascript Prototype Library Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">Javascript Prototype Library Primer Tutorial<\/p><\/div>\n<p>It seems like lately on this blog we&#8217;ve come face to face with cat skinning a lot, and want to confess here that we actually like cats at this blogsite &#8230; however &#8230; today we show, again, that there is often more than one way to (cat lovers please turn your heads now) &#8220;s&#8230; a c..&#8221;.   Today&#8217;s skinning involves the way you write your <a target=_blank href=\"http:\/\/www.w3schools.com\/js\/js_htmldom.asp\" title=\"HTML Javascript DOM\">DOM<\/a> work with Javascript.   DOM stands for <a target=_blank title='DOM information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Document_Object_Model'>Document Object Model<\/a>, and allows for dynamic manipulation of your client-side webpage objects via the use of the DOM.   The traditional approach to this, for me, for a long while, has been to spend a lot of code &#8220;time&#8221; using lines of code like &#8230;<\/p>\n<p><code><br \/>\nvar mydomobj = document.getElementById(\"myobjid\");<br \/>\n<\/code><\/p>\n<p>Today we show you an alternative set of coding notations called the <a target=_blank title='Prototype Javascript library' href='http:\/\/www.w3schools.com\/js\/js_lib_prototype.asp'>Prototype (library)<\/a> style which asks for &#8230;<\/p>\n<p><code><\/p>\n<p>&lt;script src=\" http:\/\/ajax.googleapis.com\/ajax\/libs\/prototype\/1.7.1.0\/prototype.js \"&gt;&lt;\/script&gt;<\/p>\n<p><\/code><\/p>\n<p> &#8230; within &lt;head&gt; and &lt;\/head&gt; of the webpage HTML.<\/p>\n<p>Some Prototype (library) style calls can be chained together, so the DOM work can be condensed this way, and its other advantage, if you love jQuery, is that the style of coding looks a lot like <a target=_blank title='jQuery' href='http:\/\/jquery.com'>jQuery<\/a> code.<\/p>\n<p>So click on the picture above or on this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Prototype\/\" title=\"Click for clickable iPad picture tutorial\">link<\/a> to bring up the identical functionality shown in two iframes with traditional and Prototype style Javascript respectively.<\/p>\n<p>You can start your research into Google&#8217;s Prototype (library) style Javascript here at this <a target=_blank title='Javascript Prototype library' href='http:\/\/www.w3schools.com\/js\/js_lib_prototype.asp'>link<\/a>.<\/p>\n<p>Feel free to download HTML\/Javascript programming source code for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Prototype\/poldtest.html_GETME\" title=\"poldtest.html\">poldtest.html<\/a> and <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Prototype\/ptest.html_GETME\" title=\"ptest.html\">ptest.html<\/a> for traditional and Prototype Javascript approaches, respectively.<\/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='#d6839' onclick='var dv=document.getElementById(\"d6839\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=jQuery\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d6839' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It seems like lately on this blog we&#8217;ve come face to face with cat skinning a lot, and want to confess here that we actually like cats at this blogsite &#8230; however &#8230; today we show, again, that there is &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-prototype-library-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,37],"tags":[354,513,652,663,997,1004,1319],"class_list":["post-6839","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-dom","tag-google","tag-javascript","tag-jquery","tag-programming","tag-prototype-library","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/6839"}],"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=6839"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/6839\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=6839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=6839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=6839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}