Age verification page problems

AV script needs to be called regardless

Page 1 of 1

9 Replies - 10530 Views - Last Post: 16 September 2005 - 01:01 PM

#1 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Age verification page problems

Posted 15 September 2005 - 11:57 AM

Hello all!

(long-winded background) I work for a company that brews alcoholic beverages, so on our website entrance I have an age verification script that requires viewers to enter in a valid birthdate of 21 or older. This script runs upon entrance to the homepage and also upon entrance (if URL is typed directly) to our online catalog (which is hosted by a different co., different server). the script is per session cookie, so no validation to shopping site required if they are already inside of website. My problem is this: new requirements dictate that the AV page be called up if a viewer types in a direct URL to a sub-page within my website (thereby by-passing the age verification process). I am too stoopid to figure this out on my own. I have tried to call up the script inside the header tags of a sub-page. Didn't work. I tried copying the script, re-naming it with a seperate index (also renamed) and sourcing the script in the head tags of sup-page. didn't work. It's probably so frickin' easy and the answer is staring right at me, but I am blind to it right now. Someone brilliant please help.

Is This A Good Question/Topic? 0
  • +

Replies To: Age verification page problems

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Age verification page problems

Posted 15 September 2005 - 12:21 PM

You've put the script itself on the page that is being accessed directly? Can you post the script? If you've actually put it on the page being accessed and it's not running, then all I can think of is that it's in a function and the function is not being called on page load.
Was This Post Helpful? 0
  • +
  • -

#3 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 15 September 2005 - 12:31 PM

Here's the script, am also going to post the index page. I'm not actually putting the script inline on each page (maybe that's my problem?) Could it be script conflict? THank you, Amadeus.

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#4 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 15 September 2005 - 12:32 PM

here's the index page...

Attached File(s)


Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Age verification page problems

Posted 15 September 2005 - 12:45 PM

Well, whatever page you want to run the script will need access to it...it looks like the check is an actual form in HTML on the index page...is this correct?

For reuse purposes, I'd suggest you might want to make the entire age check in javascript.

Non code note: I notice that your entrants must be over 21, yet under 150...I'd wager to say that if someone reaches 150, they deserve an alcoholic beverage! :)
Was This Post Helpful? 0
  • +
  • -

#6 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 15 September 2005 - 12:50 PM

Ha! Yes, I'd say so! Yes, the form is html, here is how i'm calling the script on the page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>

<script LANGUAGE="Javascript" SRC="mouseover_sub.js"></SCRIPT>
<script language="Javascript" src="age_validation_employees.js" type="text/javascript"></script>

<TITLE>The Employees</TITLE>


</HEAD>
table, images & other crap below.

You think script conflict?
Was This Post Helpful? 0
  • +
  • -

#7 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 15 September 2005 - 12:55 PM

Oops. I'm actually sourcing="age_validation.js" not age_validation_employees.js. I ripped this from my "play sub-page".
Was This Post Helpful? 0
  • +
  • -

#8 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 15 September 2005 - 01:35 PM

I finally frickin figured it out!.reference the document, not the script. DUHHH. Thank you Amadeus for making me flex my flabby brain
Was This Post Helpful? 0
  • +
  • -

#9 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Age verification page problems

Posted 15 September 2005 - 02:53 PM

No problem sir...glad you got it going! :)
Was This Post Helpful? 0
  • +
  • -

#10 error411413404  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 15-September 05

Re: Age verification page problems

Posted 16 September 2005 - 01:01 PM

Actually, it's Miss... No harm, no foul!

I thought I had it figured out. BUT when I am INSIDE of my website and surf to the page I am trying to age verify if someone comes directly to it from the OUTSIDE the $^&%#*@ age verification pops up on me. Must be something in the *&^$#% cookie? Someone please help, I am going to be sick.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1