View Single Post
Old 10-04-2012, 12:38 AM   PM User | #6
markman641
Regular Coder

 
Join Date: Jul 2011
Posts: 246
Thanks: 58
Thanked 1 Time in 1 Post
markman641 has a little shameless behaviour in the past
Quote:
Originally Posted by Old Pedant View Post
Again:
Code:
<input type="button" name="submit3" value="Submit" onclick="loadNextPage(1)">
and move your <script> to the *BOTTOM* of the page (just before the </body>) for simplicity and this will then work:
Code:
    <script type="text/javascript">
      var cnt=0,webpageArray = [
        "http://cnn.com/",
        "http://rapidcashgpt.com/", 
        "http://asdfasdf.com"
      ]; 

      function loadNextPage(dir) {   
        cnt+=dir;
        if (cnt<0) cnt=webpageArray.length-1; // wrap
        else if (cnt>= webpageArray.length) {
                this.form.action = '';
               } // wrap
        var iframe = document.getElementById("myframe"); 
        iframe.src = webpageArray[cnt]; 
        document.this_form.submit3.disabled = true;     
        setTimeout( functiion() { document.this_form.submit3.disabled = false; }, 10000 );
      } 
      loadNextPage(0); // actually loads first page
    </script>
It doesn't matter, but if you wish you could change the <iframe> to just:
Code:
  <iframe id="myframe"></iframe>
because now the code will start off by loading the first URL into the iframe.
Unfortunately, this does not work. The page loads, although the continue button is enabled by default and when i click it, it does nothing.
markman641 is offline   Reply With Quote