const API_BASE_PATH = 'cwlWebApi'; const API_BASE_PATH_NEW = 'cwlApps'; const HOST_NAME = window.location.hostname; /*if(HOST_NAME != 'server' && HOST_NAME != 'localhost') { $(function() { $(this).bind("contextmenu", function(e) { e.preventDefault(); }); }); document.onkeydown = function(e) { if(event.keyCode == 123) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) { return false; } if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) { return false; } } }*/ $(document).ready(function(e) { $('input').attr('autocomplete', 'off'); getTempCart(); }); function showFab() { var x = document.getElementById("dvFav"); if (x.style.display === "none") { x.style.display = "block"; $('#hideCollapse').css('display','block'); $('#showCollapse').css('display','none'); $('.brand-logo').css('display','none'); $('#dvFav').css('display','block'); } else { x.style.display = "none"; $('#hideCollapse').css('display','none'); $('#showCollapse').css('display','block'); $('.brand-logo').css('display','block'); $('#dvFav').css('display','none'); } //$("#dvFav").show(); } function getTempCart() { $.ajax({ type: 'GET', url: 'item_checkout_ajax', data: {operation: 'getTempCart'}, timeout: 2000, success: function(data) { $("#spnCart").html(data); window.setTimeout(getTempCart, 3000); }, error: function (XMLHttpRequest, textStatus, errorThrown) { //$("#notice_div").html('Timeout contacting server..'); //window.setTimeout(getTempCart, 60000); } }); } function footerFormSubmit() { var name = $("#txtName").val(); var email = $("#txtEmail").val(); var phone = $("#txtPhone").val(); var businessName = $("#txtBusinessName").val(); var message = $("#txtMessage").val(); if(name == '') { alert('Please enter your name.'); $(".contactName").focus(); return false; } else if(email == '') { alert('Please enter your email id.'); $("#txtEmail").focus(); return false; } else if(phone == '') { alert('Please enter your phone no.'); $("#txtPhone").focus(); return false; } $.ajax({ url:"ajax_return", type: "post", data: {operation: 'footerFormSubmit', name:name, email:email, phone:phone,businessName:businessName, message:message}, success: function(data) { var data = $.trim(data); alert("Email Submitted Successfully."); /*if(data == 'Success') { alert('Username and password has been sent to your email.'); window.top.location.href = 'http://ccemax.com/login'; }*/ }, error: function(xhr, ajaxoptions, thrownError) { alert(xhr.status+':'+thrownError); } }); } function cwlAlert(message) { //alert(111); $('#cwlAlertMessage').html(message); $('#cwlAlertMessageModal').modal(); } function cwlReloadAlertPage() { $('#cwlAlertMessageModal').hide(); } function showPreloader() { $("#dvPreLoader").show(); $("#dvPreLoader").html('
Please wait... We\'re getting back with the results!
'); } function hidePreloader() { $("#dvPreLoader").hide(); }