FreewayTalk
10 replies to this thread. Most Recent
pandion
12 Mar 2010, 9:01 am
Tick box - agree to terms to continue
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
================================ Peter Tucker, Oxford UK email@hidden
waltd
12 Mar 2010, 12:22 pmDraw 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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Freeway user since 1997
pandion
12 Mar 2010, 12:42 pmHi 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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
================================ Peter Tucker, Oxford UK email@hidden
pandion
12 Mar 2010, 1:11 pmSorry 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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
================================ Peter Tucker, Oxford UK email@hidden
waltd
12 Mar 2010, 1:19 pmTrue 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 hereWalterOn 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:
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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Freeway user since 1997
pandion
12 Mar 2010, 3:36 pmOK 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:
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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
================================ Peter Tucker, Oxford UK email@hidden
waltd
12 Mar 2010, 3:58 pmOkay, 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.
Walter
On Mar 12, 2010, at 5:00 AM, Peter Tucker wrote:
I need to do something like this:
http://charlesstreetsecurities.co.uk/
I could make a form but that’s a whole lot of hassle for the user, when a simple tick in the box would do.
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Best wishes Peter
—
================================ Peter Tucker, Oxford UK email@hidden
Freeway user since 1997
pandion
12 Mar 2010, 4:08 pmon 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
DeltaDave
12 Mar 2010, 9:09 pmQuick question Walter
As this relies on Javascript then what happens if the visitor does not have it enabled or switched off?
David
Glasgow, Scotland
iMac 27 Snow and Pro 5.6.3
waltd
12 Mar 2010, 10:08 pmThen 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?
David
Freeway user since 1997
pandion
12 Mar 2010, 10:20 pmHi Walter,
I’d be interested in seeing those scripts ;~}}
Cheers Peter
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?
David
Best wishes Peter
================================ Peter Tucker, Oxford UK email@hidden
