Computer Hope

Computer Hope Forum Welcome, Guest. Please login or register.
November 22, 2009, 02:12:59 PM
Home Help Staff Chat Login Register
News: Need help with posting a question?

Computer Hope Forums  >>  Internet & Networking  >>  Web design (Moderator: kpac)  >>  Topic: Basic Age Verification? 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Basic Age Verification?  (Read 215 times)
CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« on: November 03, 2009, 03:05:01 PM »

Does anyone know of a Basic Html Script that does Age Verification?

Example:


[Month DropDown] [Day DropDown] [Year DropDown]
[Enter Button]

Logged
Broni
Mastermind
*
Posts: 26042

Thanked: 352
OS: Windows Vista
Computer: Specs
Experience: Familiar




WWW
« Reply #1 on: November 03, 2009, 03:27:04 PM »

Code:
<p>
                        <span class="bold"> Month  </span>         <select style="width: 100px;" name="bMonth">
            <option value="01">January</option>
            <option value="02">February</option>
            <option value="03">March</option>
            <option value="04">April</option>
            <option value="05">May</option>
            <option value="06">June</option>
            <option value="07">July</option>
            <option value="08">August</option>
            <option value="09">September</option>
            <option value="10">October</option>
            <option value="11">November</option>
            <option value="12">December</option>
        </select>

<span class="bold">  Day  </span> <select style="width: 100px;" name="bDay">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>

<span class="bold">  Year  </span> <select style="width: 100px;" name="bYear">
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
<option value="2006">2006</option>
<option value="2005">2005</option>
etc......
</select>
                        <!-- input type="submit" name="submit" value="CONTINUE &raquo;" style="font-size: 1.5em;background-color: #fff;border: 1px solid #fb9b03;color: #fb9b03;" //-->
                        <input type="hidden" value="true" id="verifyAge" name="verifyAge"/>
                    </p>
Logged

CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #2 on: November 03, 2009, 03:38:45 PM »

Thanks a bunch, i'll give it a shot, when I have time!  Just have to learn how to use the 'Thanked Function' on CH.
Logged
Broni
Mastermind
*
Posts: 26042

Thanked: 352
OS: Windows Vista
Computer: Specs
Experience: Familiar




WWW
« Reply #3 on: November 03, 2009, 03:43:10 PM »

You're welcome Smiley
I checked it on my test board and it works...
Logged

CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #4 on: November 04, 2009, 11:45:41 AM »

hmm, weird, the submit button won't show up.  Undecided

Feel free to look at the source code:
[link removed by CrewRite]
« Last Edit: November 07, 2009, 09:59:42 PM by CrewRite » Logged
BC_Programmer
Sage
*
Posts: 8848

Thanked: 257
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #5 on: November 04, 2009, 11:52:01 AM »

because it's commented out.

<!-- and --> are comments. remove the !-- at the start of the INPUT  tag and the -- at the end.
Logged

If this is real life, where the heck is the decimal?
Broni
Mastermind
*
Posts: 26042

Thanked: 352
OS: Windows Vista
Computer: Specs
Experience: Familiar




WWW
« Reply #6 on: November 04, 2009, 11:52:34 AM »

You'll have to add an extra piece of code to get "Submit" button.

Code:
<form name="input" action="html_form_submit.asp" method="get">
<input type="submit" value="Submit" />
</form>
Logged

CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #7 on: November 04, 2009, 03:12:37 PM »

K, the script is sorted out now on InternetExplorer and FireFox, but the script won't restrict age.


This is just an example below of what i'd like it to do:

When the user selects a Birth Date that's considered below 13 years of age or younger, the script pops up a dialog that says:

Sorry, we only allow teens and adults in our site, would you like to exit to Google.com?
[No] [Yes]
« Last Edit: November 06, 2009, 01:40:50 PM by CrewRite » Logged
CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #8 on: November 06, 2009, 01:41:12 PM »

Anyone, feel like answering?  Huh?

Link to site is provided above.  3rd post from this post.

I'll try that script above again, but does not appear to go to any webpage.
« Last Edit: November 06, 2009, 02:34:06 PM by CrewRite » Logged
kpac
Web moderator
Moderator
Guru
*
Posts: 3900

Thanked: 86
OS: Windows 7
Computer: Specs
Experience: Guru
Certifications: List

Web Wizard


WWW
« Reply #9 on: November 07, 2009, 04:55:17 AM »

You'll need to use JS.

Have a look around http://www.dynamicdrive.com/ and http://javascriptkit.com/.

Google
Logged

CrewRite
Topic Starter
Rookie
*
Posts: 35

Thanked: 0
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #10 on: November 10, 2009, 01:04:35 PM »

Tried those, including Javascript Internet, but, I won't bother anymore, this age verify thing is not easy to implement.  Discovered that DaniWeb had them.
Logged
Pages: [1] - (Top) Print 
Computer Hope Forums  >>  Internet & Networking  >>  Web design (Moderator: kpac)  >>  Topic: Basic Age Verification? « previous next »
Jump to:  


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright 1998-2008 by Computer Hope (tm). All rights reserved
Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC
Page created in 0.061 seconds with 19 queries.