title: JavaScript function in Internet Explorer 11 not running
body: <p>I built this crude page for my work to help generate config files. It works wonderfully in Chrome and Firefox, but will not function in IE. When you press the generate button it doesn't do anything.</p>
  
  <p>Can someone please tell me what's wrong with it?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() {
  
    var name = document.getElementById("input_name").value;
    var phone = document.getElementById("input_phone").value;
    var address = document.getElementById("input_address").value;
    var ip = document.getElementById("input_ip").value;
    var mask = document.getElementById("input_mask").value;
    var gate = document.getElementById("input_gate").value;
    var enable = document.getElementById("input_enable").value;
    var login = document.getElementById("input_login").value;
    var vlan = document.getElementById("input_vlan").value;
    var digits = document.getElementById("input_digits").value;
    var analog = document.getElementById("analog");
    var pri = document.getElementById("pri");
    var extended = document.getElementById("extended");
  
    if (analog.checked) {
      var str = `...config file stuff...`;
      var res = str.replace(/example_name/g, name).replace(/example_phone/g, phone).replace(/example_address/g, address).replace(/example_ip/g, ip).replace(/example_gateway/g, gate).replace(/example_mask/g, mask).replace(/example_enable/g, enable).replace(/example_login/g, login);
      document.getElementById("demo").innerHTML = res;
    } else if (pri.checked) {
      var str = `...config file stuff...`;
      var res = str.replace(/example_name/g, name).replace(/example_phone/g, phone).replace(/example_address/g, address).replace(/example_ip/g, ip).replace(/example_gateway/g, gate).replace(/example_mask/g, mask).replace(/example_enable/g, enable).replace(/example_login/g, login).replace(/example_digits/g, digits);
      document.getElementById("demo").innerHTML = res;
    } else {
      var str = `...config file stuff...`;
      var res = str.replace(/example_name/g, name).replace(/example_phone/g, phone).replace(/example_address/g, address).replace(/example_ip/g, ip).replace(/example_gateway/g, gate).replace(/example_mask/g, mask).replace(/example_enable/g, enable).replace(/example_login/g, login).replace(/example_vlan/g, vlan);
      document.getElementById("demo").innerHTML = res;
    }
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
    width: 600px;
    clear: both;
    background-color: Gainsboro;
    margin-right: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
    padding-bottom: 15px;
    padding-top: 5px;
    border: 2px solid black;
    border-radius: 5px;
  }
  
  .header {
    width: 600px;
    background-color: PaleGreen;
    margin-right: auto;
    margin-left: auto;
    margin-left: auto;
    padding-right: 15px;
    padding-left: 15px;
    padding-bottom: 10px;
    padding-top: 5px;
    font-family: "Arial", Arial, sans-serif;
    border: 2px solid black;
    border-radius: 5px;
  }
  
  h1 {
    margin: 0px;
    padding: 0px;
  }
  
  h3 {
    margin: 5px;
    padding: 0px;
  }
  
  .container input[type="text"] {
    width: 95%;
    clear: both;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;div class="container"&gt;
      &lt;p&gt;&lt;b&gt;Enter the information and click the button to generate a config file.&lt;/b&gt;&lt;/p&gt;
      &lt;p&gt;Customer Name:
        &lt;input name="input_name" type="text" maxlength="512" id="input_name" class="searchField" align="left" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Customer Phone #:
        &lt;input name="input_phone" type="text" maxlength="512" id="input_phone" class="searchField" align="left" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Address:
        &lt;input name="input_address" type="text" maxlength="512" id="input_address" class="searchField" align="left" /&gt;
      &lt;/p&gt;
      &lt;p&gt;IP Address:
        &lt;input name="input_ip" type="text" maxlength="512" id="input_ip" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Subnet Mask:
        &lt;input name="input_mask" type="text" maxlength="512" id="input_mask" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Gateway:
        &lt;input name="input_gate" type="text" maxlength="512" id="input_gate" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Enable Password:
        &lt;input name="input_enable" type="text" maxlength="512" id="input_enable" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Login Password:
        &lt;input name="input_login" type="text" maxlength="512" id="input_login" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Extended Reach VLAN:
        &lt;input name="input_login" type="text" maxlength="512" id="input_vlan" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;p&gt;Digits Transferred: (Choose 0, 3, 4, 7, or all)
        &lt;input name="input_login" type="text" maxlength="512" id="input_digits" class="searchField" /&gt;
      &lt;/p&gt;
      &lt;button onclick="myFunction()" style="width:120px"&gt;Generate&lt;/button&gt;
      &lt;input type="radio" name="config-type" id="analog" checked&gt;
      &lt;label for="analog"&gt;Analog Only&lt;/label&gt;
      &lt;input type="radio" id="pri" name="config-type"&gt;
      &lt;label for="pri"&gt;Analog and PRI&lt;/label&gt;
      &lt;input type="radio" id="extended" name="config-type"&gt;
      &lt;label for="extended"&gt;Extended Reach PRI&lt;/label&gt;
    &lt;/div&gt;
    &lt;br&gt;
    &lt;div class="container"&gt;
      &lt;p id="demo"&gt;Config will generate here:&lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>