jsctechy
asked on
Over 18 disclaimer
Hi there,
I have page that takes information form the user but i need to trigger a flag or better yet to redirect she/he to a pdf depending on his/her age. Is there a way to do this an ASP?
if the filed Date of Birth is filed with a date that is not over 18 then take it to the PDF, I'm not so sure if the need of AJAX is need it here, but i'm new to ASP and not to mention AJAX (LOL) so any suggestion will be apreciate it
Thanks
JSCTECHY
I have page that takes information form the user but i need to trigger a flag or better yet to redirect she/he to a pdf depending on his/her age. Is there a way to do this an ASP?
if the filed Date of Birth is filed with a date that is not over 18 then take it to the PDF, I'm not so sure if the need of AJAX is need it here, but i'm new to ASP and not to mention AJAX (LOL) so any suggestion will be apreciate it
Thanks
JSCTECHY
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then modify the part of my code that does the age validation:
<%
'// Perform the age validation.
If (iUserAge >= MINIMUM_AGE_IN_YEARS) Then
'Call Response.Write("User is at least " & MINIMUM_AGE_IN_YEARS & " years of age.<br>" & vbNewLine)
Call Response.Redirect("http://www.somewhere.com/Application.asp")
Else
'Call Response.Write("User is not " & MINIMUM_AGE_IN_YEARS & " years old -- access denied.<br>" & vbNewLine)
Call Response.Redirect("http://www.somewhere.com/Apply.pdf")
End If
%>
-= DeathToSpam =-
<%
'// Perform the age validation.
If (iUserAge >= MINIMUM_AGE_IN_YEARS) Then
'Call Response.Write("User is at least " & MINIMUM_AGE_IN_YEARS & " years of age.<br>" & vbNewLine)
Call Response.Redirect("http://www.somewhere.com/Application.asp")
Else
'Call Response.Write("User is not " & MINIMUM_AGE_IN_YEARS & " years old -- access denied.<br>" & vbNewLine)
Call Response.Redirect("http://www.somewhere.com/Apply.pdf")
End If
%>
-= DeathToSpam =-
ASKER
do they have to be links like that?
or can i just have this?
>> Call Response.Redirect("applica tion.asp")
or can i just have this?
>> Call Response.Redirect("applica
ASKER
Also when i add all this code to my page i got an error saying
Microsoft VBScript compilation error '800a0400'
Expected statement
/sp/volunteer/index.asp, line 185
Option Explicit
^
Microsoft VBScript compilation error '800a0400'
Expected statement
/sp/volunteer/index.asp, line 185
Option Explicit
^
ASKER
disregard that error i have put it after the html tags and thats the reaon why i was getting it ;-)
ASKER
Thanks