I would like to run the javascript code in between the script tag on a button press, but the code runs as the page load. Please point out what I am doing incorrectly.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="html/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/local.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.jgfeed.js"></script>
<!--
Inline Javascript
-->
<script type="text/javascript">
$.jGFeed(
'http://feedproxy.google.com/nettuts',
function(feeds){
// Check for errors
if(!feeds){
// there was an error
return false;
}
// do whatever you want with feeds here
$('#message').append('Hello World<br />');
for(var i=0; i<feeds.entries.length; i++){
var entry = feeds.entries[i];
// Entry title
entry.title;
$('#message').append(entry.title + '<br />');
$('#message').append(entry.link + '<br />');
$('#message').append(entry.author + '<br />');
$('#message').append(entry.publishedDate + '<br />');
$('#message').append(entry.contentSnippet + '<br />');
}}, 10);
</script>
</head>
<body>
<div id="wrapper">
<div id="instruction">
<input type="button" value="Start RSS" onClick="$.jGFeed()"/>
<div id="content">
<div id="message">
</div>
</div>
</div>
</div>
</body>
</html>