Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox, and
choose Item / Extended from the main menu. Click the New button, and
you will see a sub-dialog with two fields: Name and Value. Enter the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the following:
document.observe('click',function(evt){
if(!$('iAgree') || $F('iAgree') == ''){
evt.stop();
alert('Please agree to the terms before proceeding');
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
Hi Walter, thanks - as you can imagine it’s not intended for any form of
REAL security, It’s just to put a marker down as a formal disclaimer.
BTW love the analogy.
on 12/03/2010 13:22, Walter Lee Davis at email@hidden wrote:
Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox, and
choose Item / Extended from the main menu. Click the New button, and
you will see a sub-dialog with two fields: Name and Value. Enter the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the following:
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
Sorry AFAICT I’ve followed your instructions, but I must have missed
something, have a look at a sample here:
http://pgt7.com/tick/
on 12/03/2010 13:22, Walter Lee Davis at email@hidden wrote:
Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox, and
choose Item / Extended from the main menu. Click the New button, and
you will see a sub-dialog with two fields: Name and Value. Enter the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the following:
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
document.observe('click',function(evt){
if(!$('iAgree') || $F('iAgree') == ''){
evt.stop();
alert('Please agree to the terms before proceeding');
}
}); //<-- right here
Walter
On Mar 12, 2010, at 9:11 AM, Peter Tucker wrote:
Sorry AFAICT I’ve followed your instructions, but I must have missed
something, have a look at a sample here:
on 12/03/2010 13:22, Walter Lee Davis at email@hidden wrote:
Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox, and
choose Item / Extended from the main menu. Click the New button, and
you will see a sub-dialog with two fields: Name and Value. Enter the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the
following:
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the
site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
OK added that and also tried with and without the “;” still does not work?
on 12/03/2010 14:19, Walter Lee Davis at email@hidden wrote:
True enough. I left off a closing parenthesis.
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}); //<-- right here
Walter
On Mar 12, 2010, at 9:11 AM, Peter Tucker wrote:
Sorry AFAICT I’ve followed your instructions, but I must have missed
something, have a look at a sample here:
on 12/03/2010 13:22, Walter Lee Davis at email@hidden wrote:
Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox, and
choose Item / Extended from the main menu. Click the New button, and
you will see a sub-dialog with two fields: Name and Value. Enter the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the
following:
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the
site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
Okay, two tiny tweaks and then I’m sure it will work.
First, in the checkbox, set its Value to something – anything will
do. I used the number 1. Click once on the form element, then hunt
through the Inspector until you find a field to set the value of the
checkbox form element.
Second, in the second line of the script, change the second test from
“does it equal nothing” to “does it not equal 1” (or whatever you
added as the value of the checkbox form element).
if(!(('iAgree') || $F('iAgree') != '1'){
And that should do the trick for you.
Walter
On Mar 12, 2010, at 11:36 AM, Peter Tucker wrote:
OK added that and also tried with and without the “;” still does not
work?
on 12/03/2010 14:19, Walter Lee Davis at email@hidden wrote:
True enough. I left off a closing parenthesis.
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}); //<-- right here
Walter
On Mar 12, 2010, at 9:11 AM, Peter Tucker wrote:
Sorry AFAICT I’ve followed your instructions, but I must have missed
something, have a look at a sample here:
on 12/03/2010 13:22, Walter Lee Davis at email@hidden wrote:
Draw a checkbox on the page somewhere, or insert it as an inline
element in a run of text (preferred). Click once on the checkbox,
and
choose Item / Extended from the main menu. Click the New button,
and
you will see a sub-dialog with two fields: Name and Value. Enter
the
following name and value:
id
iAgree
Apply the Protaculous Action to your page, choose prototype-packed
from the library picker in the Actions palette. Paste in the
following:
document.observe(‘click’,function(evt){
if(!$(‘iAgree’) || $F(‘iAgree’) == ‘’){
evt.stop();
alert(‘Please agree to the terms before proceeding’);
}
}
Now this by itself is not anybody’s idea of security, and it won’t
keep out Google, or anyone who uses it to navigate deep into the
site.
So it’s one of those things like putting a massive padlock on the
zipper to a tent.
on 12/03/2010 16:58, Walter Lee Davis at email@hidden wrote:
Okay, two tiny tweaks and then I’m sure it will work.
First, in the checkbox, set its Value to something – anything will
do. I used the number 1. Click once on the form element, then hunt
through the Inspector until you find a field to set the value of the
checkbox form element.
Second, in the second line of the script, change the second test from
“does it equal nothing” to “does it not equal 1” (or whatever you
added as the value of the checkbox form element).
if(!((‘iAgree’) || $F(‘iAgree’) != ‘1’){
And that should do the trick for you.
PERFECT thanks a million Walter for your perseverance ;~}}
Best wishes Peter
–
================================
Peter Tucker, Oxford UK email@hidden
Then the links just work. As I said before, this is a very notional
bit of security. There are incredibly trivial ways to work around it,
and Google will ignore it completely, so people can parachute into any
of the linked pages without ever seeing this script or agreeing to
anything.
If you really want to lock people out of a folder, I have a small set
of scripts that will do the deed.
Walter
On Mar 12, 2010, at 5:09 PM, DeltaDave wrote:
Quick question Walter
As this relies on Javascript then what happens if the visitor does
not have it enabled or switched off?
on 12/03/2010 23:07, Walter Lee Davis at email@hidden wrote:
Then the links just work. As I said before, this is a very notional
bit of security. There are incredibly trivial ways to work around it,
and Google will ignore it completely, so people can parachute into any
of the linked pages without ever seeing this script or agreeing to
anything.
If you really want to lock people out of a folder, I have a small set
of scripts that will do the deed.
Walter
On Mar 12, 2010, at 5:09 PM, DeltaDave wrote:
Quick question Walter
As this relies on Javascript then what happens if the visitor does
not have it enabled or switched off?