<html>
<head>
<script>
function showRSS(str) {
if (str.length == 0) {
document.getElementById("output").innerHTML = "";
return;
}
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("output").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET","rss.php?q="+str,true);
xmlhttp.send();
}
</script>
</head>
<body>
<p>Please Select an option to get RSS:</p>
<form>
<select onchange = "showRSS(this.value)">
<option value = "">Select an RSS-feed:</option>
<option value = "cnn">CNN</option>
<option value = "bbc">BBC News</option>
<option value = "pc">PC World</option>
</select>
</form>
<br>
<div id = "output">RSS-feeds</div>
</body>
</html>