You could use PHP or another server side scripting language to print that value to javascript:
<script type="text/javascript">
var i = <?php echo $_GET['nItems']; ?>;
...
</script>
I know this is wrong
I don't know what you know is wrong, but realize that more() should contain a window.location change, or you should write something like '...&nItems=' + (i + 3) + '">'.
Also, think hard if you really need javascript for this. You could just as well write (php):
<a href="http://feeds.feedburner.com/domain/read?format=sigpro&nItems=<?php if(!$_GET['nItems']) $_GET['nItems'] = 3; echo $_GET['nItems'] + 3; ?>">more</a>
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 101
You need to declare i outside of more(): var i=6; function more() { i += 3; ... }
twiss
Veteran Poster
1,005 posts since Apr 2010
Reputation Points: 177
Solved Threads: 101