Well, you have zero code in there doing that, so far as I can see. So I haven't the foggiest idea why it works in Chrome.
You could, however, easily fix the code:
Code:
function loadNextPage(dir) {
cnt += dir;
// this can never happen: if (cnt<0) cnt=webpageArray.length-1; // wrap
if (cnt>= webpageArray.length) {
return true;
}
var iframe = document.getElementById("myframe");
iframe.src = webpageArray[cnt];
countDown = 10;
doCountDown( );
$('html, body').animate({ scrollTop: 0 }, 'fast');
return false;
}
And then:
Code:
<input type="submit" name="submit4" value="Submit" onclick="return loadNextPage(1);">