<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11-flat.dtd">
<html>
<head>
<title>Zegary, Ajax i wyróżnianie</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<style type="text/css">
#list { width: 600px; margin: 20px; padding: 10px; border: 1px solid #ccc}
.comment { width: 400px; margin: 10px 0px}
form, #preview {  width: 600px; margin: 20px; padding: 10px; border: 1px solid #cc0}
</style>

<script type="text/javascript">
//<![CDATA[

var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://badges.del.icio.us/feeds/json/url/blogbadge?hash=f594fda59439cddf00f6d966b247a479&callback=myFunction';
document.getElementsByTagName('head')[0].appendChild(script);

function myFunction(data) {
   var obj = eval(data);
   var tags = obj[0].top_tags;
   var str = '';
   for (tag in tags) {
     str += " " + tag;
   }
   document.getElementById('preview').innerHTML = "<p>" + str + "</p>"
}

//]]>
</script>
</head>
<body>
<div id="preview">
</div>
</body>
</html>
