home/islapiiu/sites/forbes/contact-form/scripts.js 0000644 00000011702 15075727046 0016361 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhoneNumber", "spanPhone");
});
jQuery("#txtSubject").blur(function () {
validateEmpty("txtSubject", "spanSubject");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtSubject", "spanSubject") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "contact-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
subject: jQuery('#txtSubject').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtSubject').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/visitlanka/inquiry-services/scripts.js 0000644 00000011724 15120124225 0020154 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtCountry").blur(function () {
validateEmpty("txtCountry", "spanCountry");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhone", "spanPhone");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "inquiry-services/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
country: jQuery('#txtCountry').val(),
visitor_phone: jQuery('#txtPhone').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtCountry').val("");
jQuery('#txtPhone').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/visitlanka/contact-form/scripts.js 0000644 00000013757 15120217432 0017242 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhone", "spanPhone");
});
jQuery("#txtSubject").blur(function () {
validateEmpty("txtSubject", "spanSubject");
});
// jQuery("#txtAirport").blur(function () {
// validateEmpty("txtAirport", "spanAirport");
// });
// jQuery("#txtFlight").blur(function () {
// validateEmpty("txtFlight", "spanFlight");
// });
// jQuery("#txtAdate").blur(function () {
// validateEmpty("txtAdate", "spanAdate");
// });
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtSubject", "spanSubject") &
// validateEmpty("txtAirport", "spanAirport") &
// validateEmpty("txtFlight", "spanFlight") &
// validateEmpty("txtAdate", "spanAdate") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "contact-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
subject: jQuery('#txtSubject').val(),
airport: jQuery('#txtAirport').val(),
flight: jQuery('#txtFlight').val(),
start_date: jQuery('#txtAdate').val(),
passengers: jQuery('#txtPassengers').val(),
country: jQuery('#txtCountry').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtSubject').val("");
jQuery('#txtCountry').val("");
jQuery('#txtAirport').val("");
jQuery('#txtFlight').val("");
jQuery('#txtAdate').val("");
jQuery('#txtPassengers').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/villaeffort/booking-form/scripts.js 0000644 00000013310 15120273673 0017401 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtCountry").blur(function () {
validateEmpty("txtCountry", "spanCountry");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhone", "spanPhone");
});
jQuery("#txtRooms").blur(function () {
validateEmpty("txtRooms", "spanRoom");
});
jQuery("#txtType").blur(function () {
validateEmpty("txtType", "spanType");
});
jQuery("#txtAdult").blur(function () {
validateEmpty("txtAdult", "spanAdult");
});
jQuery("#txtChildren").blur(function () {
validateEmpty("txtChildren", "spanChildren");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtRooms", "spanRooms") &
validateEmpty("txtType", "spanType") &
validateEmpty("txtAdult", "spanAdult") &
validateEmpty("txtChildren", "spanChildren") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "booking-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
country: jQuery('#txtCountry').val(),
ADate: jQuery('#txtADate').val(),
DDate: jQuery('#txtDDate').val(),
room: jQuery('#txtRooms').val(),
type: jQuery('#txtType').val(),
adult: jQuery('#txtAdult').val(),
children: jQuery('#txtChildren').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
}
else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtCountry').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
}
else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
}
else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/villaeffort/contact-form/scripts.js 0000644 00000011607 15120300210 0017365 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtSubject").blur(function () {
validateEmpty("txtSubject", "spanSubject");
});
jQuery("#txtCountry").blur(function () {
validateEmpty("txtCountry", "spanCountry");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtSubject", "spanSubject") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "contact-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
subject: jQuery('#txtSubject').val(),
country: jQuery('#txtCountry').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtSubject').val("");
jQuery('#txtCountry').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/visitlanka/booking-form/scripts.js 0000644 00000015070 15120402337 0017225 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtCountry").blur(function () {
validateEmpty("txtCountry", "spanCountry");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhone", "spanPhone");
});
jQuery("#txtAdate").blur(function () {
validateEmpty("txtAdate", "spanAdate");
});
jQuery("#txtDdate").blur(function () {
validateEmpty("txtDdate", "spanDdate");
});
jQuery("#txtAdult").blur(function () {
validateEmpty("txtAdult", "spanAdult");
});
jQuery("#txtChildren").blur(function () {
validateEmpty("txtChildren", "spanChildren");
});
// jQuery("#spanHoteltype").blur(function () {
// validateEmpty("txtRooms", "spanRooms");
// });
// jQuery("#txtMealtype").blur(function () {
// validateEmpty("txtMealtype", "spanMealtype");
// });
jQuery("#txtTour").blur(function () {
validateEmpty("txtPackage", "spanPackage");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtDdate", "spanDdate") &
validateEmpty("txtAdate", "spanAdate") &
validateEmpty("txtAdult", "spanAdult") &
validateEmpty("txtChildren", "spanChildren") &
// validateEmpty("txtRooms", "spanRooms") &
// validateEmpty("txtMealtype", "spanMealtype") &
validateEmpty("txtPackage", "spanPackage") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "booking-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
country: jQuery('#txtCountry').val(),
visitor_phone: jQuery('#txtPhone').val(),
tour_package: jQuery('#txtPackage').val(),
start_date: jQuery('#txtAdate').val(),
end_date: jQuery('#txtDdate').val(),
no_of_adults: jQuery('#txtAdult').val(),
no_of_children: jQuery('#txtChildren').val(),
rooms: jQuery('#txtRooms').val(),
meal_type: jQuery('#txtMealtype').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtCountry').val("");
jQuery('#txtPhone').val("");
jQuery('#txtPackage').val("");
jQuery('#txtAdate').val("");
jQuery('#txtDdate').val("");
jQuery('#txtAdult').val("");
jQuery('#txtChildren').val("");
jQuery('#txtRooms').val("");
jQuery('#txtMealtype').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/umesh-tours/contact-form/scripts.js 0000644 00000011664 15120452114 0017361 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhoneNumber", "spanPhone");
});
jQuery("#txtSubject").blur(function () {
validateEmpty("txtSubject", "spanSubject");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("txtSubject", "spanSubject") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "contact-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
subject: jQuery('#txtSubject').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtSubject').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/taxigalle/booking/scripts.js 0000644 00000012515 15120577456 0016111 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtVehicle").blur(function () {
validateEmpty("txtVehicle", "spanVehicle");
});
jQuery("#txtStartDestination").blur(function () {
validateEmpty("txtStartDestination", "spanStartDestination");
});
jQuery("#txtEndDestination").blur(function () {
validateEmpty("txtEndDestination", "spanEndDestination");
});
jQuery("#txtDate").blur(function () {
validateEmpty("txtDate", "spanDate");
});
jQuery("#txtTime").blur(function () {
validateEmpty("txtTime", "spanTime");
});
jQuery("#txtPhone").blur(function () {
validateEmpty("txtPhone", "spanPhone");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtVehicle", "spanVehicle") &
validateEmpty("txtStartDestination", "spanStartDestination") &
validateEmpty("txtEndDestination", "spanEndDestination") &
validateEmpty("txtDate", "spanDate") &
validateEmpty("txtTime", "spanTime") &
validateEmpty("txtPhone", "spanPhone") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "booking/send-email.php",
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_vehicle: jQuery('#txtVehicle').val(),
visitor_start_destination: jQuery('#txtStartDestination').val(),
visitor_end_destination: jQuery('#txtEndDestination').val(),
visitor_date: jQuery('#txtDate').val(),
visitor_time: jQuery('#txtTime').val(),
visitor_phone: jQuery('#txtPhone').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtVehicle').val("");
jQuery('#txtStartDestination').val("");
jQuery('#txtEndDestination').val("");
jQuery('#txtDate').val("");
jQuery('#txtTime').val("");
jQuery('#txtPhone').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/royalescapestours/booking-form/scripts.js 0000644 00000013453 15120627330 0020654 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtContact").blur(function () {
validateEmpty("txtContact", "spanContact");
});
jQuery("#txtPackage").blur(function () {
validateEmpty("txtPackage", "spanPackage");
});
jQuery("#txtNoOfAdults").blur(function () {
validateEmpty("txtNoOfAdults", "spanNoOfAdults");
});
jQuery("#txtNoOfChildren").blur(function () {
validateEmpty("txtNoOfChildren", "spanNoOfChildren");
});
jQuery("#txtCheckIn").blur(function () {
validateEmpty("txtCheckIn", "spanCheckIn");
});
jQuery("#txtCheckOut").blur(function () {
validateEmpty("txtCheckOut", "spanCheckOut");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtContact", "spanContact") &
validateEmpty("txtPackage", "spanPackage") &
validateEmpty("txtNoOfAdults", "spanNoOfAdults") &
validateEmpty("txtNoOfChildren", "spanNoOfChildren") &
validateEmpty("txtCheckIn", "spanCheckIn") &
validateEmpty("txtCheckOut", "spanCheckOut") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "booking-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
full_name: jQuery('#txtFullName').val(),
email: jQuery('#txtEmail').val(),
contact: jQuery('#txtContact').val(),
package: jQuery('#txtPackage').val(),
no_of_adults: jQuery('#txtNoOfAdults').val(),
no_of_children: jQuery('#txtNoOfChildren').val(),
check_in: jQuery('#txtCheckIn').val(),
check_out: jQuery('#txtCheckOut').val(),
message: jQuery('#txtmessage').val(),
captchacode: jQuery('#captchacode').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtContact').val("");
jQuery('#txtPackage').val("");
jQuery('#txtNoOfAdults').val("");
jQuery('#txtNoOfChildren').val("");
jQuery('#txtCheckIn').val("");
jQuery('#txtCheckOut').val("");
jQuery('#txtMessage').val("");
jQuery('#captchacode').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
home/islapiiu/sites/jetlinetravels/contact-form/scripts.js 0000644 00000011676 15120717632 0020135 0 ustar 00
//--------------------------------------------------check one by one on blur--------------------------------------------------
jQuery(document).ready(function () {
jQuery("#txtFullName").blur(function () {
validateEmpty("txtFullName", "spanFullName");
});
jQuery("#txtEmail").blur(function () {
ValidateEmail("txtEmail", "spanEmail");
});
jQuery("#txtCountry").blur(function () {
validateEmpty("txtCountry", "spanCountry");
});
jQuery("#txtSubject").blur(function () {
validateEmpty("txtSubject", "spanSubject");
});
jQuery("#txtMessage").blur(function () {
validateEmpty("txtMessage", "spanMessage");
});
jQuery("#captchacode").blur(function () {
validateEmpty("captchacode", "capspan");
});
jQuery("#btnSubmit").bind('click', function () {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
});
jQuery('.input-validater').keypress(function (e) {
if (e.keyCode == 13) {
if (!validate()) {
return;
}
jQuery("#checking").show();
sendForm();
}
});
});
//--------------------------------------------------function to check button click --------------------------------------------------
function validate() {
if (
validateEmpty("txtFullName", "spanFullName") &
ValidateEmail("txtEmail", "spanEmail") &
validateEmpty("txtCountry", "spanCountry") &
validateEmpty("txtSubject", "spanSubject") &
validateEmpty("txtMessage", "spanMessage") &
validateEmpty("captchacode", "capspan")
)
{
return true;
} else {
return false;
}
}
//--------------------------------------------------Ajax call --------------------------------------------------
function sendForm() {
jQuery.ajax({
url: "contact-form/send-email.php",
cache: false,
dataType: "json",
type: "POST",
data: {
captchacode: jQuery('#captchacode').val(),
visitor_name: jQuery('#txtFullName').val(),
visitor_email: jQuery('#txtEmail').val(),
visitor_phone: jQuery('#txtPhone').val(),
country: jQuery('#txtCountry').val(),
subject: jQuery('#txtSubject').val(),
message: jQuery('#txtMessage').val()
},
success: function (html) {
var status = html.status;
var msg = html.msg;
if (status == "incorrect") {
jQuery("#capspan").addClass("notvalidated");
jQuery("#capspan").html(msg);
jQuery("#capspan").show();
jQuery("#checking").fadeOut(2000);
} else if (status == "correct") {
jQuery("#checking").hide();
jQuery("#dismessage").html(msg).delay(1000).show(1000);
jQuery('#captchacode').val("");
jQuery('#txtFullName').val("");
jQuery('#txtEmail').val("");
jQuery('#txtPhone').val("");
jQuery('#txtCountry').val("");
jQuery('#txtSubject').val("");
jQuery('#txtMessage').val("");
}
}
});
}
//----------------- function to check empty -------------------------------------------------------
function validateEmpty(field, validatorspan)
{
if (jQuery('#' + field).val().length != 0)
{
jQuery('#' + validatorspan).addClass("validated");
jQuery('#' + validatorspan).removeClass("notvalidated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("");
return true;
} else
{
jQuery('#' + validatorspan).addClass("notvalidated");
jQuery('#' + validatorspan).removeClass("validated");
jQuery('#' + validatorspan).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatorspan).text("This field can not be empty");
return false;
}
}
//--------------------------------------------------function to check email--------------------------------------------------
function ValidateEmail(field, validatordiv)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (jQuery('#' + field).val().match(mailformat))
{
jQuery('#' + validatordiv).addClass("validated");
jQuery('#' + validatordiv).removeClass("notvalidated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("");
return true;
} else
{
jQuery('#' + validatordiv).addClass("notvalidated");
jQuery('#' + validatordiv).removeClass("validated");
jQuery('#' + validatordiv).fadeIn('slow').fadeOut(3000);
jQuery('#' + validatordiv).text("You have entered an invalid Email Address");
return false;
}
}
|