Simple RSS Reader based on javascript

Here’s the simple AJAX application getting RSS data that does not use any kind of server resource except java script file itself.

I order to make script simply I designed simple javascript class at


<script type=’text/javascript’ src=’’></script>

<script language=javascript>
  function xml_call_back_sample( content)
    rss = new krss(content);

    // put HTML into content
    document.getElementById(“content”).innerHTML = “<font color=green><strong>” + rss.get(0, “title”) + “</strong></font><br>” + rss.get(0, “description”) + “<br><br>”;;
    for( i=1; i<rss.count(); i++)
      document.getElementById(“content”).innerHTML += “<font color=green><strong>” + rss.get(i, “title”) + “</strong></font><br>” + rss.get(i, “description”) + “<br><br>”;
  function getitnow()
    // get rss and define call back function which will be called when the rss data is read completely
    kajax_run( ‘’, xml_call_back_sample);

<input type=button value=’— get 1 —‘ onclick=’javascript:getitnow()’>
<div id=”content”>
click above button to get rss data from CNN



Leave a Reply

Your email address will not be published. Required fields are marked *