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.
Age verification page problemsAV script needs to be called regardless
Page 1 of 1
9 Replies - 9798 Views - Last Post: 16 September 2005 - 01:01 PM
Replies To: Age verification page problems
#2
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.
#3
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)
-
age_validation.js (3.68K)
Number of downloads: 54
#4
Re: Age verification page problems
Posted 15 September 2005 - 12:32 PM
here's the index page...
Attached File(s)
-
index_post.html (2.54K)
Number of downloads: 779
#5
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!
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!
#6
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?
<!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?
#7
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".
#8
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
#9
Re: Age verification page problems
Posted 15 September 2005 - 02:53 PM
No problem sir...glad you got it going!
#10
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.
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.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote



|