| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bsite.hellogtx.com/public/js/ |
Upload File : |
getVisaDetailData(1);
$('.visamsg').hide();
function rvMoneyFormatINR(n, prec, currSign) {
if (prec == null)
prec = 2;
var n = ('' + parseFloat(n).toFixed(prec).toString()).split('.');
var num = n[0];
var dec = n[1];
var r, s, t;
if (num.length > 3) {
s = num.length % 3;
if (s) {
t = num.substring(0, s);
num = t + num.substring(s).replace(/(\d{3})/g, ",$1");
} else {
num = num.substring(s).replace(/(\d{3})/g, ",$1").substring(1);
}
}
// return(currSign == null ? "" : currSign + "") + num + '.' + dec;
return (currSign == null ? "" : currSign + "") + num;
}
function getVisaDetailData(id) {
$('.Visa-box').removeClass().addClass('Visa-box');
$('.top-banner-content').hide();
$('.documents-required').hide();
$('.ambassy-address').hide();
$('#top-banner-content-' + parseInt(id)).show();
$('#documents-required-' + parseInt(id)).show();
$('#ambassy-address-' + parseInt(id)).show();
$('#Visa-box-' + parseInt(id)).addClass('Visa-box-active');
}
function addClassActive(that, i) {
setTimeout(function () {
$('.nav_link_id_first').removeClass('active');
$('#nav_link_id_first_' + parseInt(i)).addClass('active');
}, 300);
}
$("#nextbtn").click(function () {
// alert('hello');
$("#expanddetail").slideDown('slow');
$('#nextbtn').attr('disabled', true);
$('#getbtn').show();
});
$("#nextbtn2").click(function () {
// alert('hello');
$("#expanddetail").slideDown('slow');
$('#nextbtn').attr('disabled', true);
$('#getbtn').show();
});
$("#getbtnBack").click(function () {
// alert('hello');
$("#expanddetail").slideUp('slow');
$('#nextbtn').attr('disabled', false);
});
function getbtnBackPay() {
$("#getPriceDetail").slideUp('slow');
$('#getbtnBack').show();
$('#getbtn').attr('disabled', false);
}
$("#getbtn").click(function () {
$('#btnTypeHidden').val(1);
$('#visa_enquiry').submit();
});
$("#getbtnGetQuote").click(function () {
$('#btnTypeHidden').val(2);
$('#visa_enquiry').submit();
});
$("#visa_enquiry").on('submit', function (e) {
$('#getPriceDetail').show().html('');
var EmailReg = new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
e.preventDefault();
var data = $(this).serialize();
var leadsend = $("#leadsend").val();
if ($('.visa_enquiry input[name="date"]').val() == '') {
$('.visamsg').show().html('Please enter travel date');
$('.visa_enquiry input[name="date"]').focus();
return false;
}
if ($('.visa_enquiry input[name="visaAdult"]').val() == '') {
$('.visamsg').show().html('Please enter number of adult.');
$('.visa_enquiry input[name="visaAdult"]').focus();
alert('Please enter number of adult.');
return false;
}
$('.visamsg').hide();
var CurrencyTypeName = $('#CurrencyTypeName').val();
// alert("Hello, this is an alert!");
var btnTypeHidden = $('#btnTypeHidden').val();
$.ajax({
url: SITEURL + 'gtxwebservices/send-enquiry/postvisa',
type: 'POST',
data: data,
dataType: 'json',
beforeSend: function () {
if (btnTypeHidden == 1) {
$('#getbtn').html('Book').attr('disabled', true);
$('#getbtnGetQuote').html('Get Quote').attr('disabled', true);
$('#getbtn').html('<i class="ace-icon fa fa-spinner fa-spin orange bigger-125"></i> Please Wait...');
} else {
$('#getbtnGetQuote').html('<i class="ace-icon fa fa-spinner fa-spin orange bigger-125"></i> Please Wait...');
}
$('#getPriceDetail').html('');
},
success: function (result) {
// console.log(result);
$('#leadsend').val(1);
if ((result.status == 'success') && (result.availability == true)) {
if (btnTypeHidden == 1) {
window.location.href = result.mainurl;
return false;
} else {
$('#getbtnGetQuote').html('Get Quote').attr('disabled', false);
$('#getbtn').html('Book').attr('disabled', false);
$('#getPriceDetail').show().html(result.message).css('color', 'green');
return false;
}
} else if ((result.status == 'success') && (result.availability == "false")) {
$('#getPriceDetail').show().html("Thanks! Your enquiry submitted successfully. Soon our expert will contact you.").css({'color': '#5cb85c'});
} else if ((result.status == false) && (result.availability == "false")) {
$('#getPriceDetail').show().html('Sorry, This package is not available on selected date.\n\ But we will revert back with suitable suggestions.').css({'color': '#5cb85c'});
} else {
if (result.message != '') {
$('#getPriceDetail').show().html(result.message).css({'color': 'red'});
} else {
$('#getPriceDetail').show().html('Sorry, System encountered some error.\n\ We will revert back with suitable suggestions.').css({'color': '#ff0000'});
}
}
$('#getbtnGetQuote').html('Get Quote').attr('disabled', false);
$('#getbtn').html('Book').attr('disabled', false);
},
error: function (result) {
$('#getPriceDetail').show().html('Sorry, System encountered some error.\n\ We will revert back with suitable suggestions.').css({'color': '#ff0000'});
}
});
});
// function goPaymentPage() {
// $('#visa_enquiry').submit();
// }
function goPaymentPage() {
// alert("Hello, this is an alert!");
var mainurl = $('#mainurl').val();
window.location.href = mainurl;
// $('<form action="' + SITEURL + 'payment/index" method="POST">' + form + '</form>').appendTo($(document.body)).submit();
}
function removeErrorMessage() {
$('.visamsg').hide();
}
$(".datepicker").datepicker({minDate: 0, dateFormat: 'dd/mm/yy'});
//$(".datepicker1").datepicker({changeYear: true,minDate: 0, dateFormat: 'dd/mm/yy'});
// $( ".datepicker1" ).datepicker({
// changeMonth: true,
// changeYear: true,
// //minDate: '01/01/1970',
//
// });
function addVisaMoreTravellers(ival) {
var count_traveller = $('#count_traveller').val();
$('#add_visa_travellers').html('');
var stravel = 1;
var totaltravel = 2;
while (stravel < ival) {
$('#add_visa_travellers').append('<div class="visa_travellers " id="visa_travellers_' + totaltravel + '"><div class="row"><div class="col-lg-12 col-sm-12 col-md-12 col-xs-12 add_visa_travellers getproposal_textalign1">Traveller <span class="travellers_count">' + totaltravel + '</span> :</div><div class="visa_padding_left col-lg-2 col-sm-2 col-md-2 col-xs-6"><select class="form-control no-padding" name="salutation">' +
'<option value="1" >Mr.</option><option value="2" >Mrs</option><option value="3" >Miss</option></select></div><div class="visa_padding_left col-lg-3 col-sm-3 col-md-3 col-xs-6"> ' +
'<input type="text" name="visaAdult[]" id="visaAdult' + totaltravel + '" class="GetProposal form-control visaAdult' + totaltravel + '" value="" onkeyup="removeErrorMessage()" placeholder="First Name">' +
'</div><div class="visa_padding_left col-lg-3 col-sm-3 col-md-3 col-xs-6">' +
'<input type="text" name="visaChild[]" id="visaChild' + totaltravel + '" class="GetProposal form-control visaChild' + totaltravel + '" value="" onkeyup="removeErrorMessage()" placeholder="Last Name">' +
'</div><div class="visa_padding_left col-lg-3 col-sm-3 col-md-3 col-xs-6">' +
'<select id="pax_type" name="visaInfant[]" placeholder="Select" class="GetProposal1 form-control" ><option value="1">Adult</option><option value="2">Child</option><option value="3">Infant</option></select>' +
'</div><div class="col-lg-1 col-sm-1 col-md-1 col-xs-12 visaaction_alignright"> <a href="javascript://" class="btn btn-danger btn-sm" onclick="removeVisaTravellersRow(' + totaltravel + ')"><i class="fa fa-trash"></a></div></div></div>');
stravel++;
totaltravel++;
}
$('#count_traveller').val(parseInt(count_traveller) + 1);
}
function removeVisaTravellersRow(id) {
var count_traveller = $('#count_traveller').val();
$('#count_traveller').val(parseInt(count_traveller) - 1);
$('#add_visa_travellers').find('#visa_travellers_' + id).remove();
$("span[class^='travellers_count']").each(function (i) {
$(this).html((parseInt(i) + 2));
});
$("input[class^='visa_firstname']").each(function (i) {
$(this).removeAttr('class').addClass('visa_firstname' + (parseInt(i) + 1));
});
$("input[class^='visa_lastname']").each(function (i) {
$(this).removeAttr('class').addClass('visa_lastname' + (parseInt(i) + 1));
});
var add_visa_travellers = $('#add_visa_travellers .visa_travellers').length;
$('#selectBox').val(add_visa_travellers + 1);
}
$(function () {
$('.visa-listing li').on('click', function () {
$('.visa-listing li').removeClass('active');
$(this).addClass('active');
});
});
function getSeoName1(str) {
str = str.replace(/\s\s+/g, ' ').toLowerCase();
str = str.replace(/#|(|)|,|\/|_| +/g, '');
str = str.split(',').join('-');
str = str.split(' ').join('-');
return str.replace('--', '-');
}
function submitVisaSearchForm() {
var visaSearchFormVal = $('#visaSearchForm').val();
var visaSearchNationalityVal = $('#visaSearchNationality').val();
if (visaSearchFormVal == '') {
$('.visaSearchFormHtml').show().html('Plese select country.');
return false;
}
window.location.href = 'visa/visa/index?nation=' + getSeoName1(visaSearchNationalityVal).toLowerCase() + '&desname=' + getSeoName1(visaSearchFormVal).toLowerCase() + '-visa';
}
function getvisaSearchValue(that) {
$('.visaSearchFormHtml').hide().html('');
}
$(".talktous").on('submit', function (e) {
e.preventDefault();
var data = $(this).serialize();
var EmailReg = new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
if ($('.talktous input[name="fname"]').val() == '') {
$('.msg').html('Please enter your first name').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="fname"]').focus();
return false;
}
if ($('.talktous input[name="lname"]').val() == '') {
$('.msg').html('Please enter your last name').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="lname"]').focus();
return false;
}
if ($('.talktous input[name="email"]').val() == '') {
$('.msg').html('Please enter your email id').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="email"]').focus();
return false;
}
if (!EmailReg.test($('.talktous input[name="email"]').val())) {
$('.msg').html('Please enter valid email address!!!').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="email"]').focus();
return false;
}
if ($('.talktous input[name="mobile"]').val() == '') {
$('.msg').html('Please enter your Mobile').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="mobile"]').focus();
return false;
}
if (!$.isNumeric($('.talktous input[name="mobile"]').val())) {
$('.msg').html('Mobile should be numeric!!').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous input[name="mobile"]').focus();
return false;
}
// if ($('.talktous input[name="mobile"]').val().length != '10') {
// $('.msg').html('Mobile should be 10 digit?').css('color', 'red').fadeIn().delay(2000).fadeOut();
// $('.talktous input[name="mobile"]').focus();
// return false;
// }
if ($('.talktous textarea[name="message"]').val() == '') {
$('.msg').html('Please enter your query!').css('color', 'red').fadeIn().delay(2000).fadeOut();
$('.talktous textarea[name="message"]').focus();
return false;
}
$('.msg').html('');
$('.sendingP').attr('disabled', true);
$.ajax({
url: SITEURL + 'cms/index/sendenquiry',
type: 'POST',
data: data,
dataType: 'json',
beforeSend: function () {
$('.sendingP').html('<i class="ace-icon fa fa-spinner fa-spin orange bigger-125"></i> Sending...');
},
success: function (result) {
if (result.status) {
$('.sendingP').html('Submit Form').css('color', 'green');
$('.msg').html(result.message)
} else {
$('.sendingP').html('Submit Form').css('color', 'green');
$('.msg').html(result.message)
}
},
error: function (result) {
$('.sendingP').html('Submit Form');
alert('Some error occured.');
}
});
});
$("#from1").datepicker({
//defaultDate: "+1w",
changeMonth: false,
dateFormat: "d M yy",
numberOfMonths: 2,
minDate: 0,
buttonImage: true,
buttonImageOnly: true,
beforeShow: function () {
if ($(window).width() < 768) {
return {
numberOfMonths: 12
};
} else {
return {
numberOfMonths: 2
};
}
},
});
// Show Pop Up Model Doc Details
function showDocMoreDetail(PkgSysId) {
$.ajax({
url: '/visa/visa/doc-detail',
type: 'POST',
data: {'PkgSysId': PkgSysId},
dataType: 'text',
beforeSend: function () {
}, success: function (result) {
$(".visa-title-description").html(result);
$('#myModalDocRequired').modal('show');
}
})
}
// Show Hide and Show Div
function ShowByVisaCategory(CategoryName) {
$('.visa-type-box').hide();
$('.visa-type-box' + CategoryName).show();
$('.ShowByVisaCategoryLi').removeClass('active');
$('.ShowByVisaCategoryLi' + CategoryName).addClass('active');
}
$(".datepicker_common").datepicker({dateFormat: 'dd/mm/yy', numberOfMonths: 1});
function getNextWorkingDay(processingTime) {
var daysToAdd = 0;
var date = new Date();
var currentDate = new Date(date);
while (daysToAdd < processingTime) {
currentDate.setDate(currentDate.getDate() + 1);
// Check if the day is a working day (Monday to Friday)
if (currentDate.getDay() !== 0 && currentDate.getDay() !== 6) {
daysToAdd++;
}
}
return currentDate;
}
var processingTime = $('#ProcessingTime').val();
//alert($.isNumeric(processingTime));
if (!isNaN(processingTime) && $.isNumeric(processingTime)) {
$('.datepickerVisa').datepicker({
dateFormat: 'dd/mm/yy',
minDate: getNextWorkingDay(processingTime),
numberOfMonths: 1,
});
} else {
$('.datepickerVisa').datepicker({
dateFormat: 'dd/mm/yy',
minDate: 0,
numberOfMonths: 1,
});
}