Groups > Design > WebDev public > Re: Click only once per time frame




Click only once per time frame

Click only once per time frame
Fri, 29 Dec 2006 18:16:17 -050
I'm looking for a way, if it's possible, to have 3 buttons.  Yes, I know 
this is possible - but what I am looking to do is to have

button 1 - After being clicked, can no longer be clicked for 1 day.
button 2 - After being clicked, can no longer be clicked for 7 days.
button 3 - After being clicked, can no longer be clicked for 30 days.

How can this be achieved (Not PHP or CF)? Something to do with cookies 
no doubt...

Thanks!

Post Reply
Re: Click only once per time frame
Fri, 29 Dec 2006 20:02:11 -050
Dan Galfano wrote on 12/29/06 6:16 PM:

> How can this be achieved (Not PHP or CF)? Something to do with cookies
> no doubt...

If you're not using PHP or CF, then you'll probably be using ASP or JS. But
one of the server-side scripts is probably more robust than the JS. And yes,
I'd think you'd set a cookie and test to see if it exists. If it does, you
can disable the button by JS (there may be a CSS way as well).

Patrick

-- 
Patrick Hackshaw
RuneMedia Web Design Studio
http://runemedia.com
Post Reply
Re: Click only once per time frame
Fri, 29 Dec 2006 20:41:27 -050
Patrick -

But couldn't the user clear all cookies on their machine?

I would think a validation with an IP address or something along those 
lines...no?

-- 
Shane H
shane@NOSPAMavenuedesigners.com
http://www.avenuedesigners.com

=============================================
COMING SOON - Infooki [unboxed]:
http://infooki.sourtea.com/
Web Dev Articles, photography, and more:
http://sourtea.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495

Delivering accessible websites to all ...
=============================================


"Patrick Hackshaw" <patrick@hackshaw.com> wrote in message 
news:C1BB24C3.2D8F8%patrick@hackshaw.com...
> Dan Galfano wrote on 12/29/06 6:16 PM:
>
>> How can this be achieved (Not PHP or CF)? Something to do with cookies
>> no doubt...
>
> If you're not using PHP or CF, then you'll probably be using ASP or JS. 
> But
> one of the server-side scripts is probably more robust than the JS. And 
> yes,
> I'd think you'd set a cookie and test to see if it exists. If it does, you
> can disable the button by JS (there may be a CSS way as well).
>
> Patrick
>
> -- 
> Patrick Hackshaw
> RuneMedia Web Design Studio
> http://runemedia.com
> 

Post Reply
Re: Click only once per time frame
Fri, 29 Dec 2006 20:46:05 -050
Shane H wrote on 12/29/06 8:41 PM:

> But couldn't the user clear all cookies on their machine?
> 
> I would think a validation with an IP address or something along those
> lines...no?

Sure, they could clear cookies (or not even allow it in the first place).
But then an IP address isn't necessarily static either. At this stage, I'd
say there are too many unknowns to give a specific answer. I'm just trying
to give some general "that's the direction I'd look" advice.

Patrick

-- 
Patrick Hackshaw
RuneMedia Web Design Studio
http://runemedia.com
Post Reply
Re: Click only once per time frame
Fri, 29 Dec 2006 22:39:05 -060
> I would think a validation with an IP address or something along those 
> lines...no?

The problem with using an IP address is if they work at a company behind 
a firewall, all users behind the firewall appear to be coming from the 
same IP address.  Makes it difficult if this scenario is a possibliity.

The only guaranteed way to do it is to have the user login first, and 
then you need to ensure that users don't have multiple IDs.

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact