View Single Post
Old 10-31-2012, 04:48 PM   PM User | #21
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,167
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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);">
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote
Users who have thanked Old Pedant for this post:
markman641 (11-03-2012)