View Single Post
Old 01-04-2013, 01:49 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,195
Thanks: 59
Thanked 3,995 Times in 3,964 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
Okay...minor mod:
Code:
<script>
(
  function() 
  {
      var button = document.getElementById("store");
      var wait = setInterval(clickIt,10000);

      button.onclick = 
          function()
          { 
              alert("saved"); // optional
              clearInterval(wait);
              wait = setInterval(clickIt,10000);
          };

      function clickIt()
      {
          if ( ! button.disabled) { button.click( ); }
      }
  }
)();
</script>
But now that's not really different than your code.
__________________
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:
xelawho (01-04-2013)