input[type="submit"] { background-color: #ffff00; font-size: 16px; font-weight: bold; color: #0000aa; border-radius: 10px; }
function checkform() {
for (i=0;i<fieldstocheck.length;i++) {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].type") == "checkbox") {
if (document.subscribeform.elements[fieldstocheck[i]].checked) {
} else {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
else {
if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
alert("Please enter your "+fieldnames[i]);
eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
return false;
}
}
}
for (i=0;i<groupstocheck.length;i++) {
if (!checkGroup(groupstocheck[i],groupnames[i])) {
return false;
}
}
if(! compareEmail())
{
alert("Email Addresses you entered do not match");
return false;
}
return true;
}
var fieldstocheck = new Array();
var fieldnames = new Array();
function addFieldToCheck(value,name) {
fieldstocheck[fieldstocheck.length] = value;
fieldnames[fieldnames.length] = name;
}
var groupstocheck = new Array();
var groupnames = new Array();
function addGroupToCheck(value,name) {
groupstocheck[groupstocheck.length] = value;
groupnames[groupnames.length] = name;
}
function compareEmail()
{
return (document.subscribeform.elements["email"].value == document.subscribeform.elements["emailconfirm"].value);
}
function checkGroup(name,value) {
option = -1;
for (i=0;i<document.subscribeform.elements[name].length;i++) {
if (document.subscribeform.elements[name][i].checked) {
option = i;
}
}
if (option == -1) {
alert ("Please enter your "+value);
return false;
}
return true;
}
|
|||||||||
Your Given Name (required) | |
Your Family Name (required) | |
Your Email (required) | |
Your Mobile Number (required) | |
How did you hear about Sophisticat? ---GoogleSophisticat websiteOther onlineVetFriend or relativeA Sophisticat customerOther | |
Please tell us |
|
What is your message about? |
|
Your Message |
|
document.getElementById("tellusmore").style.display = 'none'; document.getElementById("hearabout").addEventListener("change", displayTextField); function displayTextField() { var dropDownText = document.getElementById("hearabout").value; if (dropDownText == "Other" || dropDownText == "Other online") { document.getElementById("tellusmore").style.display = 'block'; document.getElementById("more").innerHTML = 'where...'; } else if (dropDownText == "Vet" ) { document.getElementById("tellusmore").style.display = 'block'; document.getElementById("more").innerHTML = 'which Vet...'; } else { document.getElementById("tellusmore").style.display = 'none'; } }