12-06-2012 04:29 AM - edited 07-03-2021 11:10 PM
Hi All,
I've got a very basic web authentication page working but need to include a CHECK BOX to verify a user has read the T&C's. Got the checkbox to display but need the script code to disable (when not checked) either username/password input or the submit button. Any of you bright guy's managed to do this or anything similar.
Web splash attached.
Thank for any replies,
Solved! Go to Solution.
12-06-2012 10:26 AM
Guy's sorted it
if(!document.getElementById('agree').checked){
alert('Please agree to the terms and conditions.');
return false;
}else{
var link = document.location.href;
var searchString = "redirect=";
var equalIndex = link.indexOf(searchString);
var redirectUrl = ""; if(!document.getElementById('agree').checked){
alert('Please agree to the terms and conditions.');
return false;
}else{
var link = document.location.href;
var searchString = "redirect=";
var equalIndex = link.indexOf(searchString);
var redirectUrl = "";
Thanks anyway!
12-06-2012 10:26 AM
Guy's sorted it
if(!document.getElementById('agree').checked){
alert('Please agree to the terms and conditions.');
return false;
}else{
var link = document.location.href;
var searchString = "redirect=";
var equalIndex = link.indexOf(searchString);
var redirectUrl = ""; if(!document.getElementById('agree').checked){
alert('Please agree to the terms and conditions.');
return false;
}else{
var link = document.location.href;
var searchString = "redirect=";
var equalIndex = link.indexOf(searchString);
var redirectUrl = "";
Thanks anyway!
12-06-2012 10:32 AM
Good job... can you post the html so others can actually see what you have done?
Thanks,
Scott
Help out other by using the rating system and marking answered questions as "Answered"
12-06-2012 01:21 PM
No problem done!
Cheers,
Jason
12-07-2012 05:21 AM
Thanks Jason!
Sent from Cisco Technical Support iPhone App
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: