title: Javascript inside iframe not working in Internet Explorer
body: <p>The following JavaScript code is not running within an iframe form being loaded on a page using Internet Explorer. When the form is loaded outside of an iframe it works fine. We've narrowed down the issue to the code below, which isn't running. The code below allows the user to select the current year or a future year on the form. On IE11 and down the select box is empty but it fills in the options on Chrome and Firefox. However, it's working on Edge. </p>
  
  <pre><code>        &lt;script type="text/javascript"&gt;
              var $year = new Date().getFullYear() - 2000;
              var test = '';
              if(test &gt; 2000)
                  test = test - 2000;
              for(var i =0;i&lt;10;i++) {
                  var selected = "";
                      if(test == '') {
                          if(i == 2)
                          selected = "selected";
                      } else {
                          if(i+$year == test)
                              selected = "selected";
                      }
                  document.write("&lt;option value='"+(i+$year)+"' "+ selected +"&gt;"+ (i+$year) +"&lt;/option&gt;");
              }
              &lt;/script&gt;
  </code></pre>