1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4: <head>
5: <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6: <title>RSS Reader</title>
7: <link rel="stylesheet" type="text/css" href="cs/reader.css" />
8: <script src="js/rss.js" type="text/javascript"></script> 1:
2: <script type="text/javascript">
3: function getRssFeedFromSelection() {
4: // get Selected Feed
5: feeds = document.getElementById("feeds");
6: var myindex = feeds.selectedIndex;
7: var SelValue = feeds.options[myindex].value;
8:
9: getRssFeed(SelValue);
10: }
11: function getRssFeedFromUrl() {
12: // get Url from textBox
13: txtRssUrl = document.getElementById("txtRSSFeedUrl");
14: var rssUrl = txtRssUrl.value;
15:
16: getRssFeed(rssUrl);
17: }
18: function getRssFeed(rssUrl) {
19: // get Item Count
20: txtItemCount = document.getElementById("txtItemCount");
21: var itemCount = txtItemCount.value;
22:
23: var entryHtmlFormat = "";
24: entryHtmlFormat += "<div class=\"entry\"><h2 class=\"postTitle\">[[TITLE]]<\/h2>";
25: entryHtmlFormat += "<em class=\"date\">[[PUBDATE]] | [[AUTHOR]]</em>";
26: entryHtmlFormat += "<p class=\"description\">[[DESCRIPTION]]</p>";
27: entryHtmlFormat += "<a href=\"[[LINK]]\" target=\"_blank\">Read More >><\/a><\/div>";
28:
29: // Use the proxy to retrieve the RSS feed's xml
30: ReadRSS('proxy.ashx?url=' + rssUrl, entryHtmlFormat, "rssContent", itemCount);
31: };
32:
</script>
9: </head>
10: <body>
11: <div id="container">
12: <div id="ui">
13: <br />
14: <img src="http://www.wijix.com/themes/illacrimo Modified/images/LogoIcon.png" width="20%" />
15: <h1>RSS Feed Reader</h1>
16: <form id="selectParser" action="">
17: <table border="0" style="width:100%;">
18: <tr>
19: <td style="width:100px;"><label>Select a feed:</label></td>
20: <td>
21: <select id="feeds" style="width:98%;">
22: <option value="">Select</option>
23: <option value="http://www.wijix.com/syndication.axd">Wijix</option>
24: <option value="http://feeds.feedburner.com/dotnetkicks">DotNetKicks</option>
25: <option value="http://www.asp.net/news/rss.ashx/">ASP.NET News</option>
26: <option value="http://feeds.digg.com/digg/container/technology/popular.rss">Digg - Technology</option>
27: <option value="http://rss.slashdot.org/Slashdot/slashdot">SlashDot</option>
28: <option value="http://online.wsj.com/xml/rss/3_7014.xml">Wall Street Journal - Business</option>
29: <option value="http://online.wsj.com/xml/rss/3_7455.xml">Wall Street Journal - Technology</option>
30: </select>
31: </td>
32: <td style="width:75px;">
33: <input id="btnGetFeedSelection" type="button" value="Retrieve" onclick="getRssFeedFromSelection();" />
34: </td>
35: </tr>
36: <tr>
37: <td><label>Enter RSS url:</label></td>
38: <td align="left"><input id="txtRSSFeedUrl" type="text" style="width:98%;"/></td>
39: <td><input id="btnGetFeedfromUrl" type="button" value="Retrieve" onclick="getRssFeedFromUrl();" /></td>
40: </tr>
41: <tr>
42: <td><label>Items to Display:</label></td>
43: <td><input id="txtItemCount" type="text" value="5" style="width:50px;"/></td>
44: <td></td>
45: </tr>
46: </table>
47: </form>
48: </div>
49: <div id="rssContent">
50:
51: </div>
52: </div>
53: </body>
54: </html>