for javascript file go to http://jquery.com
<script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script type="text/javascript" language=javascript>
$(document).ready(function() {
$.ajax({
type: "GET",
url: "http://yourdomain.com/rss.xml",
dataType: "xml",
success: function(xml) {
$('#update-target').empty();
var str="";
$(xml).find('item').each(function(){
var title = $(this).find('title').text()
var link = $(this).find('link').text()
var desc = $(this).find('description').text()
str +="<tr><td><a href='"+link+"' >"+title+"</a><br />";
str+="<a href='"+link+"' >"+desc.substring(0,100)+"...</a></td></tr>";
}); //close each(
$('#update-target').html(str);
}
}); //close $.ajax(
$("#msg").ajaxError(function(event, request, settings){
$(this).append("Error requesting page " + settings.url + "");
});
}); //close $(
</script>
[/sourcecode]
Place bellow html part in body tab
[sourcecode language="html"]
<Table id='update-target'>
</Table>
<div id=msg></div>
I'm getting "Error requesting page http://www.xul.fr/rss.xml "
ReplyDeleteand isn't the link xml because I have tried with others urls