Here is the first bit:
<script type='text/javascript'>
window.onload=function(){
var strLinks = '';
for (var i = 1; i <= 23; i++) {
strLinks += '<li><a><img src="chapter_1/'+ i +'.jpg" alt="" /></a></li>';
}
document.getElementById("pages").innerHTML = strLinks;
}
</script>
And the second bit:
<script type='text/javascript'>
window.onload=function(){
var strLinks = '';
for (var i = 1; i <= 5; i++) {
strLinks += '<option value="http://google.com">link '+ i +'</option>';
}
document.getElementById("chapter").innerHTML = strLinks;
}
</script>
The first one would basically add images automatically and the second one would add links automatically as well until the loop ends. However when I try to put these two together, the first one won't run at all. How do I get both of these to run?