Em Andamento

Javascript year of birth selector with 'Over 18' checkbox appearing when over-18 status ambiguous in year of birth

I need people who register on my website to enter their year of birth and if necessary confirm that they are over 18. I don't need the whole date of birth and I believe it would discourage registrations if I asked for it.

yearCurrent = the year now

yearOfBirth = the user's year of birth

There should be a drop-down year selector menu that is automatically populated with years from yearCurrent-18 descending to 1901. So in 2010 the menu would be from 1992 to 1901.

As you can see, someone born on June 1 1992 will be 17 at the start of 2010 and 18 after June 1.

So if the user selects a yearOfBirth that indicates that they are either 17 or 18, a pair of radio buttons named 'adult' should appear where they can indicate age 17 or 18.

If they click '17', then text should appear "This site is for over-18s only."

If the user is unambiguously over 18, (yearCurrent - yearOfBirth > 18) these radio buttons should not appear but there should be a hidden field also named 'adult' with a value of '1'.

I would like this to drop into my form as a unit so there is no code before the form and none after. This really does make things simpler for me.

Habilidades: Engenharia, Javascript, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: javascript date birth years, year, year make, status code, selector php, code status, php selector, php date selector, php radio field, adult website buttons, adult enter site javascript, date selector, date birth form, php form selector, radio menu, register adult site, javascript enter website, javascript confirm adult, can register adult website, adult website click enter, adult website enter, adult site menu, enter site javascript, confirm javascript, javascript confirm

Acerca do Empregador:
( 53 comentários ) United Kingdom

ID do Projeto: #3015652

Premiar a:

coffeewithsuds

See private message.

$7 USD em 14 dias
(5 Avaliações)
1.8

31 freelancers estão ofertando em média $21 para este trabalho

hits

See private message.

$68 USD in 14 dias
(860 Comentários)
8.7
RockStone435

See private message.

$17 USD in 14 dias
(310 Comentários)
7.6
pShankar2

See private message.

$85 USD in 14 dias
(404 Comentários)
7.1
stevebryant

See private message.

$21.25 USD in 14 dias
(502 Comentários)
6.7
BinSotec

See private message.

$34 USD in 14 dias
(80 Comentários)
6.5
dvfabia

See private message.

$12.75 USD in 14 dias
(259 Comentários)
6.3
xsixer

See private message.

$17 USD in 14 dias
(130 Comentários)
6.0
racvrs

See private message.

$24.65 USD in 14 dias
(239 Comentários)
6.0
surfingtonio

See private message.

$17 USD in 14 dias
(96 Comentários)
5.5
scriptosaur

See private message.

$8.5 USD in 14 dias
(91 Comentários)
5.1
blirding

See private message.

$17 USD in 14 dias
(73 Comentários)
5.0
gutlu

See private message.

$21.25 USD in 14 dias
(61 Comentários)
4.9
sagarshah1983

See private message.

$8.5 USD in 14 dias
(36 Comentários)
4.8
cosminmvw

See private message.

$51 USD in 14 dias
(64 Comentários)
4.6
aumalaiarasan

See private message.

$17 USD in 14 dias
(69 Comentários)
4.6
darkoloncar

See private message.

$17 USD in 14 dias
(17 Comentários)
4.2
hotan

See private message.

$12.75 USD in 14 dias
(34 Comentários)
4.1
ZqSarani

See private message.

$5.95 USD in 14 dias
(43 Comentários)
3.9
dancristian

See private message.

$8.5 USD in 14 dias
(8 Comentários)
3.8
svasti

See private message.

$12.75 USD in 14 dias
(13 Comentários)
3.6