Marketo

Marketo makes marketing automation software for companies. Marketo products are provided on a subscription basis and include lead management, sales insight, revenue cycle analytics and social marketing.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am creating a piece of javascript to show an opt-in field only if a specific country is chosen on a form AND the email address is not a public email address.  It checkes to see if the email @ is not a specific email extension and the country.

So if I choose The United Kingdom (which passes)  and fill in an email address of info@MYWEBSITE.com, the info@MYWEBSITE.com fails.  Below in the code it alerts "Stage Nine"  Which should indicate that my domain is not on the list (country_list).  

So somewhere between line 60 and line 75 it fails and/or I have something wrong in my code.  Any insight will be helpful. (optin function)

<script>
$(document).ready(function() {
    MktoForms2.whenRendered(function(mform) {
  var varIsDeclared = true; 

  if (domain_list.length == 1) {
    domain_list = "@gmail.com; @yahoo.com; @hotmail.com".split(";");
  }
  if (country_list.length == 1) {
    country_list = "Austria;Italy;Belgium;Latvia;Bulgaria;Lithuania;Croatia;Luxembourg;Cyprus;Malta;Czechia;Netherlands;Denmark;Poland;Estonia;Portugal;Finland;Romania;France;Slovakia;Germany;Slovenia;Greece;Spain;Hungary;Sweden;Ireland;United Kingdom".split(";");
  }


  try{ mktoPreFillFields; }
  catch(e) {
      if(e.name == "ReferenceError") {
          varIsDeclared = false;
      }
  }

  $('#Country').change(function(){
      
    if ($('#Country').val() != 'United States') {
        
      if (varIsDeclared) {
        if (!$('#GDPR_Opt_In__c').is(':checked')) {
            

Open in new window

0
Become a Certified Penetration Testing Engineer
LVL 12
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Marketo

Marketo makes marketing automation software for companies. Marketo products are provided on a subscription basis and include lead management, sales insight, revenue cycle analytics and social marketing.

Top Experts In
Marketo
<
Monthly
>