{"id":47,"date":"2016-09-27T08:36:25","date_gmt":"2016-09-27T08:36:25","guid":{"rendered":"http:\/\/10.0.3.2\/wordpress\/?p=47"},"modified":"2018-01-09T04:56:27","modified_gmt":"2018-01-09T04:56:27","slug":"ajax-clients-back-end","status":"publish","type":"post","link":"https:\/\/info.juliusgoh.life\/?p=47","title":{"rendered":"Ajax (Client&#8217;s Back &#8211; End)"},"content":{"rendered":"<p>function loadDoc() {<br \/>\nvar xhttp = new XMLHttpRequest(); \/\/Open OOP<br \/>\nxhttp.onreadystatechange = function() {\/\/ Do Something When result is return<br \/>\nif (this.readyState == 4 &amp;&amp; this.status == 200) {<br \/>\ndocument.getElementById(&#8220;demo&#8221;).innerHTML = this.responseText;<br \/>\n}<br \/>\n};<br \/>\nxhttp.open(&#8220;GET&#8221;, &#8220;ajax_info.txt&#8221;, true);<br \/>\nxhttp.send();<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/Ajax doing at back end as client , it can changes the front end display after the back end is done.<\/p>\n<p>\/\/http:\/\/www.w3schools.com\/ajax\/ajax_xmlhttprequest_onreadystatechange.asp<\/p>\n<p>\/\/readystate &amp; status representation<\/p>\n","protected":false},"excerpt":{"rendered":"<p>function loadDoc() { var xhttp = new XMLHttpRequest(); \/\/Open OOP xhttp.onreadystatechange = function() {\/\/ Do Something When result is return if (this.readyState == 4 &amp;&amp; this.status == 200) { document.getElementById(&#8220;demo&#8221;).innerHTML = this.responseText; } }; xhttp.open(&#8220;GET&#8221;, &#8220;ajax_info.txt&#8221;, true); xhttp.send(); } &nbsp; \/\/Ajax doing at back end as client , it can changes the front end display [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":219,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"_links":{"self":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/47"}],"collection":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":1,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions\/231"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=\/wp\/v2\/media\/219"}],"wp:attachment":[{"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/info.juliusgoh.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}