{"id":10855,"date":"2014-12-01T05:07:47","date_gmt":"2014-11-30T18:07:47","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10855"},"modified":"2018-10-28T07:34:19","modified_gmt":"2018-10-27T21:34:19","slug":"javascript-putelementsby-via-php-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-putelementsby-via-php-primer-tutorial\/","title":{"rendered":"Javascript putElement(s)By via PHP Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/putElementsBy.php?url=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.php\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Javascript putElement(s)By via PHP Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/putElementsBy.jpg\" title=\"Javascript putElement(s)By via PHP Primer Tutorial\" id='ghfsdw' onmouseover='  this.src=this.src.replace(\".gif\",\".JPG\").replace(\".jpg\",\".png\").replace(\".png\",\".gif\").replace(\".JPG\",\".jpg\");       '  \/><\/a><p class=\"wp-caption-text\">Javascript putElement(s)By via PHP Primer Tutorial<\/p><\/div>\n<p>If you are into Javascript <a target=_blank title='(Javascript) DOM information from Wikiedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Document_Object_Model'>DOM<\/a> you will be into &#8230;<\/p>\n<ul>\n<li><a target=_blank title='Javascript getElementById() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_document_getelementbyid.asp'>getElementById()<\/li>\n<li><a target=_blank title='Javascript getElementsByClassName() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_document_getelementsbyclassname.asp'>getElementsByClassName()<\/a><\/li>\n<li><a target=_blank title='Javascript getElementsByTagName() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_document_getelementsbytagname.asp'>getElementsByTagName()<\/a><\/li>\n<\/ul>\n<p>&#8230; and being into programming, for every <i>get<\/i> you ever see in a function or method name, you may be accustomed to looking for the <i>set<\/i> or <i>put<\/i> reverse functionality function or method.<\/p>\n<p>Gadzooks &#8230; there is no &#8230;<\/p>\n<ul>\n<li>putElementById()<\/li>\n<li>putElementsByClassName()<\/li>\n<li>putElementsByTagName()<\/li>\n<\/ul>\n<p>&#8230; and no <i>set<\/i> versions either, in Javascript &#8230; but today we imagine a set of Javascript functions (minus the document. bizzo though &#8230; a poet who doesn&#8217;t know it&#8230; chortle, chortle) &#8230; how could they work? &#8230; well, you could try packing them off with a couple of vegemite sandwiches and an orange off up the road to get the bus &#8230; or, well, maybe a transfer of HTML element&#8217;age (elementary &#8230; no end to the chortles today!) to the end of our own webpage (optionally from another URL, perhaps &#8230; (we&#8217;ll need PHP) &#8230; haven&#8217;t dealt with relative URLs yet, though).<\/p>\n<p>So, try it if you like &#8230;<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/putElementsBy.php' title='Use this as the URL'>Live run with this page as the URL<\/a><\/li>\n<li><a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/putElementsBy.php?url=http:\/\/www.rjmprogramming.com.au\/PHP\/audio_video.php' title='Use audio_video.php as the URL'>Live run with another page as the URL<\/a><\/li>\n<\/ul>\n<p>Today&#8217;s downloadable PHP is <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/putElementsBy.php_GETME' title='putElementsBy.php'>putElementsBy.php<\/a> (whose code would improve with the relative URL issue disappearing &#8230; and if this disappears you know we got to that first!)<\/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='#10855' onclick='var dv=document.getElementById(\"d10855\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=DOM\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10855' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you are into Javascript DOM you will be into &#8230; getElementById() getElementsByClassName() getElementsByTagName() &#8230; and being into programming, for every get you ever see in a function or method name, you may be accustomed to looking for the set &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-putelementsby-via-php-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,486,576,652,932,997,1319],"class_list":["post-10855","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-dom","tag-getelementbyid","tag-html","tag-javascript","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10855"}],"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=10855"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10855\/revisions"}],"predecessor-version":[{"id":41537,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/10855\/revisions\/41537"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=10855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=10855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=10855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}