Posts

Showing posts with the label AJAX
Share:

Read Blogger Feeds Using AJAX Callback Function - Amit Padhiyar (Saatody)

This article is all about read AJAX callback function. This callback function gives output in XML and JSON formats. This will also help us to make blogger widgets without blogger tags like <b:widget>. The callback function read blogger feeds using readJSON() and readXML() functions. Write entire program between <script> tag. <script> </script> Create callback function in AJAX function read(_url, _function){ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function(){ if (this.readyState == 4 && this.status == 200){ _function(this); } }; xhttp.open('GET',_url,true); xhttp.send(); } Create callback function for JSON format function readJSON(_url, _function){ read(_url + "?alt=json", _function); } Create callback function for XML format function readXML(_url, _function){ read(_url ,_function); } Create function that write output in browser conso