PDA

View Full Version : Delay the "AGREE" Button


Ruth
09-17-2001, 10:56 PM
in the rules section and before someone agrees to the rules, the AGREE button can't be clicked till after 30 seconds. to force them to read the rules.

any other thoughts?

Admin
09-18-2001, 06:42 AM
There's probably a Java script for this... I guess.

Stasik
09-27-2001, 10:52 AM
Ahm... ok....

u need to edit your signupadult and signupadult templates

find line starts with:
<form

replace the whole (!) line with:
<form action="register.php" method="post" name=register>


find line:
<input type="submit" class="bginput" value="Agree">

replace with:
<input type="submit" name="Submit" class="bginput" value="Agree">

after: $footer add

<script>
document.forms.register.Submit.disabled =true;
window.setTimeout("Timer()", 15000);
function Timer() {
document.forms.register.Submit.disabled =false;
};
</script>


delay here is set to 15 seconds.....

Demo here (http://forums.realwebhost.net/register.php?action=signup)

Admin
09-27-2001, 12:30 PM
Nice... 15 sec is a bit too long tho, I think 10 is better.

Good job! :)

Stasik
09-27-2001, 12:49 PM
to make 10 sec delay replace 15000 with 10000

Admin
09-27-2001, 12:51 PM
Yeah I figured that out myself. :)

BradC
09-27-2001, 03:29 PM
great idea... makes them atleast... wait.. if they still are hard headed enough not to read the agreement :)

holev
09-27-2001, 04:11 PM
improved it a bit:

<script>
secs = 10; // Number of secs to delay
wait = secs * 1000;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/1000);i++) {
window.setTimeout("doUpdate(" + i + ")", i * 1000);
}
window.setTimeout("Timer()", wait);

function doUpdate(num) {
if(num == (wait/1000)) {
document.forms.register.Submit.value = "Agree";
} else {
wut = (wait/1000)-num;
document.forms.register.Submit.value = "Agree (" + wut + ")";
}
}

function Timer() {
document.forms.register.Submit.disabled =false;
}
</script>


now it will show the user how much time is left by changing the value of the button.

Admin
09-27-2001, 05:06 PM
Can you get a demo? I'd like to see this in action. :)

Stasik
09-27-2001, 05:32 PM
Fly: cant u imagine it? :D :D :D

BradC: respect... i hadn`t need that feature

Admin
09-27-2001, 05:33 PM
Sorry, my imagination is very limited. :D

Ruth
09-27-2001, 06:36 PM
Thank you guys :)

Joshua Clinard
11-14-2001, 05:49 PM
Which instance of 1000 do you replace with 1500, or whatever value you want for the seconds? I replaced all of them with 3000, and it slowed down the seconds, to where 3 seconds elapsed for every second that it counted. I also want to change the button to read "I Agree." Where do I put that in? Can someone highlight the part of the code I need to change to change the number of seconds, and the part I should change to make it read "I Agree"

Joshua Clinard
11-15-2001, 08:20 PM
Help Please!

squawell
11-15-2001, 08:33 PM
Originally posted by Joshua Clinard
Which instance of 1000 do you replace with 1500, or whatever value you want for the seconds? I replaced all of them with 3000, and it slowed down the seconds, to where 3 seconds elapsed for every second that it counted. I also want to change the button to read "I Agree." Where do I put that in? Can someone highlight the part of the code I need to change to change the number of seconds, and the part I should change to make it read "I Agree"
<script>
document.forms.register.Submit.disabled =true;
window.setTimeout("Timer()", 15000);
function Timer() {
document.forms.register.Submit.disabled =false;
};
<script>


i think the 15000 is u looking for~~

u can change 15000 u want it to be~~~

i do it like that~~

fiona
11-15-2001, 10:13 PM
brill
thanks

Joshua Clinard
11-15-2001, 10:44 PM
I meant which instance of 10 do you replace with 15 in the following code, and also where do I put the "I Agree" label?


<script>
secs = 10; // Number of secs to delay
wait = secs * 1000;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/1000);i++) {
window.setTimeout("doUpdate(" + i + ")", i * 1000);
}
window.setTimeout("Timer()", wait);

function doUpdate(num) {
if(num == (wait/1000)) {
document.forms.register.Submit.value = "Agree";
} else {
wut = (wait/1000)-num;
document.forms.register.Submit.value = "Agree (" + wut + ")";
}
}

function Timer() {
document.forms.register.Submit.disabled =false;
}
</script>

Joshua Clinard
11-17-2001, 08:59 PM
Bump!

bigmattyh
11-19-2001, 05:46 AM
Originally posted by Joshua Clinard
I meant which instance of 10 do you replace with 15 in the following code, and also where do I put the "I Agree" label?
Here goes:
secs = 10; // Number of secs to delayReplace this 10 with however many seconds you want the delay.
document.forms.register.Submit.value = "Agree";Replace "Agree" with "I Agree".
document.forms.register.Submit.value = "Agree (" + wut + ")";Finally, replace this "Agree (" with "I Agree (". You're set.

If you haven't yet tried, you should try playing around with the code if things aren't exactly the way you like 'em. Look for clues.

Like, for your question, you'd look for lines in the code that clue you in -- and you'd find the line "secs = 10; // Number of secs to delay" So change the number and see what happens. Or if you want to change "Agree" to "I Agree", just change the instances in the code where you see "Agree". On a short (and relatively simple) script such as this, you can't go wrong, and even if you screw something up, all you have to do is cut and paste and go back and fix it.

exodus
12-08-2001, 11:08 PM
I guess you saw the demo because it has been put into use on the register page for vB.org. :)

Originally posted by FireFly
Can you get a demo? I'd like to see this in action. :)

bira
12-09-2001, 08:15 AM
What about adding an error message if the button is clicked before the alloted time, stating "If you're clicking that fast, you haven't read the terms!" ?

Joshua Clinard
12-15-2001, 06:12 AM
would someone release this, so that I could ckick the button that says I have installed it?

[D]Vincent
02-13-2003, 01:34 PM
question, where do you add this:
<script>
secs = 10; // Number of secs to delay
wait = secs * 1000;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/1000);i++) {
window.setTimeout("doUpdate(" + i + ")", i * 1000);
}
window.setTimeout("Timer()", wait);

function doUpdate(num) {
if(num == (wait/1000)) {
document.forms.register.Submit.value = "Agree";
} else {
wut = (wait/1000)-num;
document.forms.register.Submit.value = "Agree (" + wut + ")";
}
}

function Timer() {
document.forms.register.Submit.disabled =false;
}
</script>


[edit]
nevermind, i figured it out, heh, just read the first post again lol

davidthornton
09-12-2011, 04:59 AM
Is there anything like this for vBulletin 4? I used this about 8 years ago in 3 and I liked it.

BirdOPrey5
09-12-2011, 11:14 AM
No one is going to read the rules anyway, timer or not.

davidthornton
09-13-2011, 12:48 AM
No one is going to read the rules anyway, timer or not.

Maybe but if they're forced to sit their for 30 seconds or so before they can click "I agree", and the rules are bulleted, they might just spend some time looking. Whats more the delay makes it even harder for anyone to claim "I just clicked okay and didn't read the rules" because they had to pause and wait. It's a pity this mod appears to have been forgotten about.

BirdOPrey5
09-13-2011, 10:49 AM
Looking at this again, since the VB4 rules are displayed on the same page as other registration information, putting in a 30 second delay isn't very useful because it will take someone 30 seconds to fill in their username, password, email, and any other info.

On VB3 the rules were on their own page, there was nothing else to do but read them.