English Japanese Kawa.netxp [ajax] RSS BOX in your website

How to put a RSS BOX in your website.


Get two library files from following links:


Copy the following source code.
Rewrite url = "http://..." value as your website's RSS file URL.
Put this into <head>...</head> section in your website.

<script type="text/javascript" src="jkl-hina.js" charset="Shift_JIS"></script>
<script type="text/javascript" src="jkl-parsexml.js"></script>
window.onload = function () {
    var url = "http://www.kawa.net/rss/index-e.rdf";
    var http = new JKL.ParseXML( url );
    var func = function ( data ) {
        var hina = new JKL.Hina( "rssbox" );
        var dest = hina.expand( data, "rssbox" );
        dest.style.display = "";
    http.async( func );
// --></script>


Copy the following source code.
Change the appearance of rss box if you want.
Put this into anywhere <body>...</body> section in your website.
This is a hidden template and not displayed without JavaScript.

<div id="rssbox" style="display: none; border: 1px solid #3366CC; width: 160px; background: #FFFFFF;">
<table cellpadding="0" cellspacing="0" border="0">
  <tr><th style="background: #3366CC; color: #FFFFFF; font-size: 10px;">RSS BOX</th></tr>
  <tr title="@foreach item1 [/rdf:RDF/item]">
    <td style="font-size: 10px; color: #666666; width: 160px;">
      <a _href="[/item1/link]" style="color: #666666; text-decoration: none;">[/item1/title]</a>

Note: If you use RSS 2.0(index.rss or index.xml) instead of RDF(index.rdf), you have to change just one line of the source.

  <tr title="@foreach item1 [/rdf:RDF/item]">
  <tr title="@foreach item1 [/rss/channel/item]">

Comments by AjaxCom


Trackbacks by AjaxTB

Trackback URL: http://www.kawa.net/service/tb/ajaxtb.cgi/works/ajax/rss/rss-box-e.html

Kawa.netxp © Copyright 2005-2006 Yusuke Kawasaki