Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.147.126.199
function getAbsoluteFile() {
var loc = window.location;
if (loc.href.indexOf('?') > 0) {
loc = loc.href.substring(0, loc.href.indexOf('?'));
}
return loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1);
}
$(document).ready(function () {
var page = getAbsoluteFile();
if (page == '') {
$('.foot-links ul li.foot-links').addClass('acttoplnk');
} else {
if ($('#breadcrumbs .activebc').length) {
var topnavlink = $('#breadcrumbs .activebc:first a').attr('href');
$('.toplinks li a[href="' + topnavlink + '"]').parent().addClass('acttl');
$('.footerlinks li a[href="' + page + '"]').closest('li').addClass('actfooter');
$('.rightlinks li a[href="' + page + '"]').closest('li').addClass('actlnk');
$('.portfolilink li a[href="' + topnavlink + '"]').closest('li').addClass('actportfoliolnk');
$('.quicklinks li a[href="' + page + '"]').parent().addClass('active');
} else {
$('.toplinks li a[href="' + page + '"]').parent().addClass('acttl');
$('.footerlinks li a[href="' + topnavlink + '"]').closest('li').addClass('actfooter');
$('.rightlinks li a[href="' + page + '"]').closest('li').addClass('actlnk');
$('.portfolilink li a[href="' + page + '"]').closest('li').addClass('actportfoliolnk');
$('.quicklinks li a[href="' + page + '"]').parent().addClass('active');
}
}
$("#mnu_btn").click(function () {
$("#wrk_wrap").slideToggle('200', "swing", function () {
});
});
$("#rnav > li > div").on("click", function (e) {
if ($(this).parent().has("ul")) {
e.preventDefault();
}
if (!$(this).hasClass("open")) {
$("#rnav li ul").slideUp(350);
$("#rnav li a").removeClass("open");
$(this).next("ul").slideDown(350);
$(this).addClass("open");
} else if ($(this).hasClass("open")) {
$(this).removeClass("open");
$(this).next("ul").slideUp(350);
}
});
$("#work1 > li > div").on("click", function (e) {
if ($(this).parent().has("ul")) {
e.preventDefault();
}
if (!$(this).hasClass("open")) {
$("#work1 li ul").slideUp(350);
$("#work1 li a").removeClass("open");
$(this).next("ul").slideDown(350);
$(this).addClass("open");
} else if ($(this).hasClass("open")) {
$(this).removeClass("open");
$(this).next("ul").slideUp(350);
}
});
var current_val = "contact-us";
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
$("#submitvalue").bind("click", function () {
var yx = $('input[name="textName"]');
var textName = $.trim(yx.val());
if (textName == "") {
$('.errorbox').html('Please Enter Your Name').addClass('errorboxcss');
yx.focus();
return false;
} else {
var error = $('.errorbox').text();
if (error != "") {
$('.errorbox').text("");
}
}
var y = $('input[name="txtCompany"]');
var txtCompany = $.trim(y.val());
if (txtCompany == "") {
$('.cerrorbox').html('Please Enter Your Company Name').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.cerrorbox').text();
if (error != "") {
$('.cerrorbox').text("");
}
}
var y = $('input[name="txtContactno"]');
var txtContactno = $.trim(y.val());
if (txtContactno == "") {
$('.phnerrorbox').html('Please Enter Your Contact Number').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.phnerrorbox').text();
if (error != "") {
$('.phnerrorbox').text("");
}
}
if (isNaN(txtContactno)) {
$('.phnerrorbox').html('Please Enter the valid Contact Number(Like : 9876543210)').addClass('errorboxcss');
y.focus();
return false;
}
if ((txtContactno.length > 15) || (txtContactno.length < 10)) {
$('.phnerrorbox').html('Please Enter Your Contact Number must be 10 to 15 Integers').addClass('errorboxcss');
y.select();
return false;
}
var y = $('input[name="emailid"]');
var emailid = $.trim(y.val());
if (emailid == "") {
$('.emailerrorbox').html('Please Enter Your Email-Id').addClass('errorboxcss');
y.focus();
return false;
} else {
var y = $('input[name="emailid"]');
var emailid = y.val();
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z ]{2,4})$/;
if (reg.test(emailid) == false) {
$('.emailerrorbox').html('Please Enter Valid Email-id').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.emailerrorbox').text();
if (error != "")
{
$('.emailerrorbox').text("");
}
}
}
var y = $('input[name="services"]:checked').length;
var idArray = [];
if (y == 0)
{
$('.serviceserrorbox').html('Please Select atleast one Services!').addClass('errorboxcss');
//y.focus();
$('input[name="services"]').focus();
return false;
} else {
var error = $('.serviceserrorbox').text();
if (error != "")
{
$('.serviceserrorbox').text("");
}
}
if (y > 0)
{
$("#displaybox input:checkbox:checked").each(function () {
idArray.push($(this).attr("value"));
});
}
var y = $('#budget');
var budget = $.trim(y.val());
if (budget == "0")
{
$('.budgeterrorbox').html('Please Select the Budget!').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.budgeterrorbox').text();
if (error != "")
{
$('.budgeterrorbox').text("");
}
}
var y = $('textarea[name="comment"]');
var comment = $.trim(y.val());
if (comment == "")
{
$('.commenterrorbox').html('Please Write Description About Your Projects... !').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.commenterrorbox').text();
if (error != "")
{
$('.commenterrorbox').text("");
}
}
var y = $('input[name="captch"]');
var captch = $.trim(y.val());
if (captch == "")
{
$('.captcherror').html('Please Enter the Value !').addClass('errorboxcss');
y.focus();
return false;
} else {
var error = $('.captcherror').text();
if (error != "")
{
$('.captcherror').text("");
}
}
if (captch != c) {
$('.captcherror').html('Please Enter the Correct Number').addClass('errorboxcss');
y.focus();
return false;
}
xmlhttp.open("POST", "request-proposal.php");
//xmlhttp.send();
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("action=" + current_val + "&name=" + textName + "&compny=" + txtCompany + "&cno=" + txtContactno + "&email=" + emailid + "&services=" + idArray + "&budget=" + budget + "&comment=" + comment);
$('#formboxbg, #reqform').fadeOut('slow');
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
$("input[type=text], textarea, select").val("");
$('input:checkbox').removeAttr('checked');
alert('Thank you for sharing your requirement details. Our team will get back to you soon.');
window.location.reload();
// $('#pfade').html(xmlhttp.responseText);
// $('#formboxbggg').fadeIn('fast').fadeOut('fast');
}
}
});
});
|