Skip to content

Instantly share code, notes, and snippets.

@kosmikko
Created February 21, 2011 12:10
Show Gist options
  • Select an option

  • Save kosmikko/836981 to your computer and use it in GitHub Desktop.

Select an option

Save kosmikko/836981 to your computer and use it in GitHub Desktop.
JavaScript Widget
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Netcycler RSS feed example page</title>
<!-- Date: 2010-12-30 -->
</head>
<body>
<!-- Do the formating here by changing the border, width, height etc... -->
<div id="netcycler-rss"
style="border: 1px solid #ccc; width:350px; height:500px;">
Netcycler RSS feed
</div>
<!--
or define separated css-class like the one below and put it somewhere between <head> and </head> -tags
<style>
#netcycler-rss{
border: 1px solid #ccc;
width:500px;
height:700px"
background-color: yellow;
}
</style>
and add following tag where you like to see the feed
<div id="netcycler-rss"></div>
-->
<script language="javascript">
(function () {
// Select "wish" or "offer":
var type = "offer";
// Select "fi-fi" or "en-fi":
var language = "fi-fi";
// "Select item count:
var maxitems = "3";
// Select "template1.html":
var template = "template1.html"
// don't change following line, if you aren't sure what you are doing:
document.getElementById('netcycler-rss').innerHTML = '<iframe src="http://feedreader.netcycler.com/rss2html.php?XMLFILE=http%3A%2F%2Fwww.netcycler.fi%2Ffeed%2F%3Fitem_type%3D' + type + '%26lang%3D' + language + '&TEMPLATE=' + template + '&MAXITEMS=' + maxitems + '" id="#netcycler-rss-iframe" frameborder="no" height="100%" width="100%"></iframe>';
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment