Click to See Complete Forum and Search --> : age verifcation
hi
I have know idea what iam doing but here goes
Found this age verifcatiuon script on www.foster.com.au and out it on this page
http://www.thehuskypub.com.au/links3.html wil not work so went to
//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com)
//For full source code, documentation, and terms of usage,
//Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm
but cant find it
what iam trying to do is
on verifcation of age to go to
http://www.thehuskypub.com.au/links.html
but doesnt work would some one please look at source of page and see were iam going wrong
any help will be most appreciated.
Regatrds
Don
Just try dynamicdrive.com if that link doesn't work...
Hi Jona
i did that mate spent hours looking for original script with no luck
Hmmmm.... I see. Well, we can always write the script right here. :) So.. What's it supposed to do? Something like this...
<html><head>
<script>
var ageWin;
var config = "height=400,width=300"; //add your window configurations
function testAge(){
if(document.ageForm.age<18){
ageWin = window.open("","ageWin",config);
with(ageWin.document){
writeln("<html><head><title>You are underage</title></head>");
writeln("<body><h1>You are underaged to view this site. Please exit <a href=\"javascript:opener.location='http://yahoo.com/';self.close();\">here</a>.</h1></body></html>");
} } }
</script></head><body>
<form name="ageForm">
<input type=text name="age"><br>
<input type=button value="Click here" onClick="testAge();">
</form></body></html>
Hi again Jona
added to www.thehuskypub.com.au/links3.html
get error message
this is example of what iam trying to do
http://www.fosters.com.au/corporate/
then click on fosters web shop logo
age verfication comes up
trying to dulicate from this part age verfication to open www.thehuskypub.com.au/links.html
regards
Don
Oh, if that is what you're trying to accomplish, it takes multiple form fields. But--does the month/day need to be in there? If so, what is the youngest date possible to be eighteen?
havik
04-22-2003, 10:26 AM
Here's a link to a very simple age redirection script:
http://javascript.internet.com/navigation/age-redirect.html
It used alert boxes but it'd be easy to switch those to text boxes and have the age redirection take place when the form is submitted.
If you need any help with this let me know.
Havik
Hi Guys
lowest age which is 18 is one thing I didnt thing about and when i did
it is a problem as it will change each day
today in OZ is 23-04-2003 so to enter site today the higest date inserted in form could be 23-04-1985 but tomorrow it would be 24-04- 1985
maybe Havik idea of useing current form and and apapting
redirect script will work.
to be honest it doesnt stop under ages view they just have to do the math and say they were born in 1985.
guys any help on this problem would be most appreciated
as my script skills avery limited
regards
Don
Well, how about get the current date, put it in the format dd/mm/yy, and then search through it to see if it is equal to or less than the difference of the two.
like cuurent date eg 23/04/2003 -18 = any date less than23/04/1985 will trigger corret redirect ?
sounds good can thsi be worked in to a script?
Yeah, it can. If no one else replies, I'll have the script for you tomorrow. (Sorry I'm so busy.)
thanks mate your help is most appreciated
will check back tomorrow
reards
Don
Dude, what the heck anyway? I mean, why not let's just do the year or something. This is driving me nuts (on my spare time! :p). I've never been good with the date object... They have to agree to get in, so why bother with age validation? Just wondering.....
:) Hi mate
i know were you are coming from and i agree kids will just in the right any way.
It is more for the do gooders so it looks like we are doing something to stop them.
I Have been search the net and think best way is going to be asp. script
my pages are on asp server so have set up one pub page on it to do asp then redirect to thehuskypub.com.au
stil not work will have a play today when i get up
I appreciate all your help, that the thing ihttp://www.jervisbaytourism.com/hp/ like about this fourm every one i have texted with have been extremly helpfully.
Jona if there is any thing I can help you with please dont hesitate to contsact me.
Iam baker by trade only do web as hobie so this is all a big learning curve for me
will let you know how i go with asp
Regards
Don
If you need help with the ASP, you can try posting in the ASP forum... Like I said I could probably do it with Javascript, but... I've never been good with the date object. Sorry. :o
Mate dont be sorry you done good work
Thanks again