vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Delay the "AGREE" Button (https://vborg.vbsupport.ru/showthread.php?t=28316)

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:
Code:

<form
replace the whole (!) line with:
Code:

<form action="register.php" method="post" name=register>

find line:
Code:

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

<input type="submit" name="Submit" class="bginput" value="Agree">
after:
Code:

$footer
add
Code:

<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

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:
Code:

<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


All times are GMT. The time now is 02:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01112 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete