function StartContactIntegration() { var firstname = FirstName; var lastname = LastName; var email = EmailAddress; var phone = PhoneNumber; var message =Message; var companyName =CompanyName; if(firstname !="" && (email!="" || phone!="")){ var data = "&com_firstname=" + firstname + "&com_lastname=" + lastname + "&com_email=" + email + "&com_mobileno=" + phone + "&com_descriptioninfo=" + message + "&com_companyname" + companyName+"&mobilecountry_code=91&Leadtitle=Website Enquiry" ; $.ajax({ url: "##URL", data: data, type: "Post", error: function(data) {;}, success: function(data) {;} }); }else{alert('Invalid Data')}; }