Hey guys,
I have a simple problem in javascript that I can't figure out.
I am adding a feedburner url into an html page, but need to make it so you can increase the amount of posts you want to see. Ex. The default amount of posts on the page starts at three, but then I would have a button called more where you would click it to view say 3 more, and then if you clicked it again 3 more, ect.
This button would have to call a javascript function correct?
Right now I have:
(I know this is wrong, but it will give you an idea of what i am trying to do)
<script type="text/javascript">
var i=3;
function more()
{
var i = i + 3;
}
</script>
<script "text/javascript" >
document.write('<a href = "http://feeds.feedburner.com/domain/read?format=sigpro&nItems=' + i + '">');
</script>
<noscript>
<p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/domain/read"></a><br/>Powered by FeedBurner</p>
</noscript>
<form>
<input type="button" value="More" onclick="more()" />
</form>
The nItems declares how many posts are on the page, so I would want it to equal a variable that can be changed via the button. Also if someone knows how to add ajax so you don't have to refresh the page, that would be a nice extra.
Thanks! I look forward to your responses.