Lock a Link for a certain amount of time(30 seconds)?

2 replies
I'm wondering if there is a way to lock a link for a certain amount of time. So I have this offer that I want to offer someone but I want it to be locked for the first 30 seconds of there arrival on my webpage. Is this script anywhere? Thanks guys!
#amount #link #lock #seconds #time30
  • Profile picture of the author seaGal86
    I'm using codebreaker to do it which is a little different but I think will work. If there is a simple code for the 30 seconds instead let me know. Thanks!
    {{ DiscussionBoard.errors[1733310].message }}
    • Profile picture of the author BrianLeanza
      Simply combine window.onload, setTimeout, and the .href parameter.

      This should do the trick:

      <html>
      <head>
      <script type="text/javascript">
      function setHref()
      {
      var anchor = document.getElementById('googleLink');
      anchor.href = 'http://www.google.com';
      }
      function activateLink()
      {
      setTimeout('setHref()', 1000); // 1000 milliseconds
      }

      window.onload = activateLink();
      </script>
      <head>
      <body>
      <a id='googleLink'>Google</a>
      </body>
      </html>
      {{ DiscussionBoard.errors[1733472].message }}

Trending Topics