Is it possible to have a delay for a link to activate?

Discussion in 'HTML & Website Design' started by checksum, Sep 12, 2006.

  1. #1
    What I mean is it possible to code a link so it can only be accessed after a set amount of time?
     
    checksum, Sep 12, 2006 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Only if you use some sort of server side programming - javascript would too but then the link wouldn't be search engine friendly and you've defeated the purpose most likely.

    You could easily create a script that checks the date and only shows a link if it's within the range.

    I use phpAdsNew to do stuff like that but you could do it with a simple script too, depends on how much you are doing etc.
     
    sarahk, Sep 12, 2006 IP
  3. checksum

    checksum Notable Member

    Messages:
    2,633
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    230
    #3
    What I want to do is pretty simple, just set a link on a page and have a counter for it to be accessed. When the counter runs out the link can be clicked.

    I was hoping to find a free script that covered this kind of linking. Any ideas if there are any?

    Being search engine friendly isn't necessary for what I need.
     
    checksum, Sep 12, 2006 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #4
    so after 30 seconds it can be clicked? (for example)
     
    sarahk, Sep 12, 2006 IP
  5. checksum

    checksum Notable Member

    Messages:
    2,633
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    230
    #5
    Yes, exactly that.
     
    checksum, Sep 12, 2006 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #6
    try this...

    <html>
    	<head>
    		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    <script>
    var d = new Date()
    var t = d.getTime()
    var myDelay = 6000
    
    function isittime()
    {
    	var curd = new Date();
    	var curt = curd.getTime();
    	if ((curt - t) < myDelay) 
    	{
    		alert( "You can't go here yet");
    		return false;
    	}
    }
    </script>
    	</head>
    
    	<body bgcolor="#ffffff">
    		<p><a href="http://www.itamer.com/" onclick="return isittime()">can  you click it?</a></p>
    	</body>
    
    </html>
    Code (markup):
    It's search engine friendly too ;)
     
    sarahk, Sep 12, 2006 IP
    checksum likes this.
  7. checksum

    checksum Notable Member

    Messages:
    2,633
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    230
    #7
    The popunder script I am using cancels out the delay and loads the page anyways, any other ideas?

    Click to see - I have set the delay to 10 seconds on the test page.
     
    checksum, Sep 12, 2006 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,814
    Likes Received:
    4,535
    Best Answers:
    123
    Trophy Points:
    665
    #8
    do the world a favour and don't have popunders?

    On a more practical note, without delving into the ad code I'm out of ideas.

    I like your test page btw - easier to see what's going on.
     
    sarahk, Sep 12, 2006 IP
  9. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #9
    why not use setTimeout instead of delay, if it's conflicting with another delay that is
     
    frankcow, Sep 12, 2006 IP
  10. checksum

    checksum Notable Member

    Messages:
    2,633
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    230
    #10
    Nope, same effect with setTimeout. :(
     
    checksum, Sep 12, 2006 IP
  11. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #11
    that doesn't make sense, you're timing a specific function with setTimeout, there should be no interference
     
    frankcow, Sep 12, 2006 IP
  12. checksum

    checksum Notable Member

    Messages:
    2,633
    Likes Received:
    101
    Best Answers:
    0
    Trophy Points:
    230
    #12
    The popunder script is set to activate as soon as a link is clicked, it must be hijacking the browser to the next page. Powerful script. I'm not allowed to edit it either.

    Take a look at the counter on this download page, this is more or less what I was looking for.

    http://rapidshare.de/files/31092787/WoE42.avi.html - go down and click free.

    Any idea how much it would cost for someone to develop me a script like that? I don't have the experience to do it myself.

    Edit: I'm continuing the thread in the services section - Click
     
    checksum, Sep 12, 2006 IP