Disqus api help json ajax?
-
url = "http://disqus.com/api/get_forum_list?us… this url returns a json object. how will process this through ajax. is this the right way httpObject.open("GET", url, true);
-
Answer:
try this (it's cross browser friendly)- //////////////////////////////////////… var xmlhttp=null; if(window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); } else if(window.ActiveXObject){ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } if(xmlhttp!=null){ xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4){ var JSON=xmlhttp.responseText; var obj=eval("("+JSON+")");// this turns the JSON into an object // now call a function and pass it "obj" // or just do something with it here }}} xmlhttp.open("GET",url,true); xmlhttp.send(null);
frank r at Yahoo! Answers Visit the source
Related Q & A:
- How to import facebook comments to Disqus?Best solution by Stack Overflow
- How to pass multiple parameters in a single Ajax function?Best solution by stackoverflow.com
- What is the simplest ajax upload plugin or script to be used with wordpress?Best solution by WordPress
- How to use ajax with autocomplete in jquery?Best solution by Stack Overflow
- how to use ajax with json in ruby on rails?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.