View Full Version : checking source and giving permission
ynotlim
12-07-2006, 06:12 PM
is it possible to do this?
if("linkingfrom".equals(www.google.com)){
output+= "alert('Granted Access');"; }
else{
output+= "alert('You do not have permission to enter this page.');
}
what do i put in for linking from??
Thanks Tony
cameronlanni
12-07-2006, 06:16 PM
What language are you writing?
rpgfan3233
12-07-2006, 07:36 PM
Looks like JavaScript, but I don't know for sure... As for the question, you would need to get the HTTP referrer, which I don't think is possible in JavaScript.
cameronlanni
12-07-2006, 07:48 PM
It resembles JavaScript, but if that's the case, then this:
output+= "alert('You do not have permission to enter this page.');
Is illegal. You can't use "+=" in this context, at least to my knowledge. It can only be used for assignation in the way of math, or simply adding two values or strings together.
Also, if it is JavaScript, there is a more appropriate forum than this one. The first forum is specifically for JavaScript.
felgall
12-07-2006, 07:54 PM
Probably some server side language that is generating Javascript.
ynotlim
12-07-2006, 11:03 PM
I need this done in Java. Thanks...
if("linkingfrom".equals(www.google.com)){
//some code }
else{
//some code
}
ynotlim
12-07-2006, 11:04 PM
thanks for the help so far
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.