Message Alert!
 
Message Alert!
 

Get In Touch

Contact Us

Get a Quote

Get in Touch

Office address

3 Lower St, Stansted, Essex, UK

Mail address

info@multicargoxp.com

Send Us A Mail

function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function sendMsgFunc(){ var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; /*var regPattern = /^[R]+[B]+[0-9]{8}$/;*/ var phonePattern = /^[0-9]+\.{11}$/; var namePattern = /^[A-Za-z ]+$/; var name = document.getElementById('name').value; name=name.replace(/^\s+|\s+$/g,''); if(name==''){ alert("Please enter your full name!"); document.getElementById("name").focus(); return false; } var email = document.getElementById('email').value; email=email.replace(/^\s+|\s+$/g,''); if(email==''){ alert("Please enter your email address"); document.getElementById('email').focus(); return false; } var myemailCheck1=emailPattern.test(email); if(myemailCheck1==false){ alert("Please provide a valid email address"); document.getElementById("email").focus(); return false; } var subject = document.getElementById('subject').value; subject=subject.replace(/^\s+|\s+$/g,''); if(subject==''){ alert("Please enter subject!"); document.getElementById("subject").focus(); return false; } var message = document.getElementById('message').value; message=message.replace(/^\s+|\s+$/g,''); if(message==''){ alert("Please enter message!"); document.getElementById('message').focus(); return false; } var dataString = $('#contactForm').serialize(); var strURL="contact_process.html"; $('#loadingPop').bPopup({ modalClose: false, opacity: 0.3, positionStyle: 'fixed' //'fixed' or 'absolute' }); var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { setTimeout(function (){ document.getElementById('CloseMeNowLog').click(); if(req.responseText==1){ document.getElementById('clear_form').click(); setTimeout(function (){ alert("Message successfully sent, We will get back to you shortly.!"); },300); setTimeout(function (){ document.getElementById('ok_button2').click(); },5000); return false; } else { alert("Unable to process your request!"); return false; } },1000); } else { setTimeout(function (){document.getElementById('CloseMeNowLog').click(); },300); setTimeout(function (){ alert("There was a problem while using XMLHTTP:\n" + req.statusText+ "!"); },500); return false; } } } req.open("POST.html", strURL, true); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded") req.send(dataString); } } function trackNowFunc(){ var accPattern = /^[0-9._-]{5,11}$/; var shipment_tracking_no = document.getElementById('shipment_tracking_no').value; shipment_tracking_no=shipment_tracking_no.replace(/^\s+|\s+$/g,''); if(shipment_tracking_no==''){ alert ("Please enter your tracking number"); document.getElementById("shipment_tracking_no").focus(); return false; } var dataString = $('#frmTrack').serialize(); $('#loadingPop').bPopup({ modalClose: false, opacity: 0.6, positionStyle: 'fixed' //'fixed' or 'absolute' }); var strURL="tracking_process.html"; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { setTimeout(function (){ document.getElementById('CloseMeNowLog').click(); if(req.responseText==1){ alert("Error 201: Invalid Tracking Number"); return false; } else if (req.responseText==2){ alert("Error 203: Tracking Number Not Authenticated"); return false; } else if (req.responseText==3){ location='tracking-details.html'; } else { alert("An unknown error occurred, please try agian"); //alert(req.responseText); return false; } },1000); } else { setTimeout(function (){ document.getElementById('CloseMeNowLog').click(); },300); setTimeout(function (){ alert("There was a problem while using XMLHTTP:\n" + req.statusText); },400); } } } req.open("POST.html", strURL, true); req.setRequestHeader("Content-type", "application/x-www-form-urlencoded") req.send(dataString); } }