rendered paste body<html>
<head>
<title>JoomlArt Gadget</title>
<style>
body{width:120;height:160}
</style>
<script>
function doLoado(){
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=oXmlChange;
var params = "http://www.mysite.com/index2.php?option=com_rss&feed=RSS2.0&no_html=1" + new Date().getTime();
xmlhttp.open("GET",params ,true)
xmlhttp.send(null)
setTimeout("doLoado()", 60000);
}
function oXmlChange() {
if (xmlhttp.readyState == 4)
{
if (xmlhttp.status == 200){
var rXML = xmlhttp.responseXML;
ListPosts(rXML);
xmlhttp = null;
}
}
}
function ListPosts(rXML)
{
var ResponseContent = "";
var nl = rXML.getElementsByTagName('item');
for( var i = 0; i < 6; i++ ) {
var nli = nl.item(i);
var title = new String(nli.getElementsByTagName('t itle')[0].text);
var link = nli.getElementsByTagName('link')[0 ].text;
var desc = nli.getElementsByTagName('descript ion')[0].text;
if(title.length > 17)
{
title = title.substring(0,17) +"...";
}
ResponseContent += "<li><a href=\"" + link + "\" onclick=\"OpenURL(this.href)\" title=\"" + desc + "\">" + title + "</li></a>";
}
document.getElementById('postList' ).innerHTML = ResponseContent;
}
function OpenURL(url){
System.Shell.execute(url);
}
</script>
</head>
<body onload="doLoado();">
</body>
</html>