title: Javascript Not working within IE 8
body: <p>I'm looking for any suggestions on why <a href="http://jsfiddle.net/kbJpj/1/" rel="nofollow">this script</a> is not working prior to IE 9, so far as I know. I've tried using previous browser settings via IE 9 and it works for it's standards for IE 8 and 7.</p>
  
  <pre><code>&lt;body&gt;
      &lt;div class="custom-field-container form-row "&gt;
          &lt;div class="form-content"&gt;
              &lt;div class="form-input-label-block"&gt;
                  &lt;label for="date_of_birth_date_MONTH"&gt;Date Of Birth&lt;/label&gt;
              &lt;/div&gt;
              &lt;fieldset&gt;
                  &lt;label for="date_of_birth_date_MONTH"&gt;&lt;span style="display:none;"&gt;Month&lt;/span&gt;&lt;/label&gt;
                  &lt;label for="date_of_birth_date_DAY"&gt;&lt;span style="display:none;"&gt;Day&lt;/span&gt;&lt;/label&gt;
                  &lt;label for="date_of_birth_date_YEAR"&gt;&lt;span style="display:none;"&gt;Year&lt;/span&gt;&lt;/label&gt;
                  &lt;select name="date_of_birth_date_MONTH" id="date_of_birth_date_MONTH" title="Month"&gt;
                      &lt;option value="1" &gt;Jan&lt;/option&gt;
                      &lt;option value="2" &gt;Feb&lt;/option&gt;
                      &lt;option value="3" &gt;Mar&lt;/option&gt;
                      &lt;option value="4" &gt;Apr&lt;/option&gt;
                      &lt;option value="5" &gt;May&lt;/option&gt;
                      &lt;option value="6" &gt;Jun&lt;/option&gt;
                      &lt;option value="7" &gt;Jul&lt;/option&gt;
                      &lt;option value="8" &gt;Aug&lt;/option&gt;
                      &lt;option value="9" &gt;Sep&lt;/option&gt;
                      &lt;option value="10" selected="selected"&gt;Oct&lt;/option&gt;
                      &lt;option value="11" &gt;Nov&lt;/option&gt;
                      &lt;option value="12" &gt;Dec&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;select name="date_of_birth_date_DAY" id="date_of_birth_date_DAY" title="Day"&gt;
                      &lt;option value="1" &gt;1&lt;/option&gt;
                      &lt;option value="2" &gt;2&lt;/option&gt;
                      &lt;option value="3" &gt;3&lt;/option&gt;
                      &lt;option value="4" &gt;4&lt;/option&gt;
                      &lt;option value="5" &gt;5&lt;/option&gt;
                      &lt;option value="6" &gt;6&lt;/option&gt;
                      &lt;option value="7" &gt;7&lt;/option&gt;
                      &lt;option value="8" selected="selected"&gt;8&lt;/option&gt;
                      &lt;option value="9" &gt;9&lt;/option&gt;
                      &lt;option value="10" &gt;10&lt;/option&gt;
                      &lt;option value="11" &gt;11&lt;/option&gt;
                      &lt;option value="12" &gt;12&lt;/option&gt;
                      &lt;option value="13" &gt;13&lt;/option&gt;
                      &lt;option value="14" &gt;14&lt;/option&gt;
                      &lt;option value="15" &gt;15&lt;/option&gt;
                      &lt;option value="16" &gt;16&lt;/option&gt;
                      &lt;option value="17" &gt;17&lt;/option&gt;
                      &lt;option value="18" &gt;18&lt;/option&gt;
                      &lt;option value="19" &gt;19&lt;/option&gt;
                      &lt;option value="20" &gt;20&lt;/option&gt;
                      &lt;option value="21" &gt;21&lt;/option&gt;
                      &lt;option value="22" &gt;22&lt;/option&gt;
                      &lt;option value="23" &gt;23&lt;/option&gt;
                      &lt;option value="24" &gt;24&lt;/option&gt;
                      &lt;option value="25" &gt;25&lt;/option&gt;
                      &lt;option value="26" &gt;26&lt;/option&gt;
                      &lt;option value="27" &gt;27&lt;/option&gt;
                      &lt;option value="28" &gt;28&lt;/option&gt;
                      &lt;option value="29" &gt;29&lt;/option&gt;
                      &lt;option value="30" &gt;30&lt;/option&gt;
                      &lt;option value="31" &gt;31&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;select name="date_of_birth_date_YEAR" id="date_of_birth_date_YEAR" title="Year"&gt;
                      &lt;option value="2015" &gt;2015&lt;/option&gt;
                      &lt;option value="2014" &gt;2014&lt;/option&gt;
                      &lt;option value="2013" selected="selected"&gt;2013&lt;/option&gt;
                      &lt;option value="2012" &gt;2012&lt;/option&gt;
                      &lt;option value="2011" &gt;2011&lt;/option&gt;
                      &lt;option value="2010" &gt;2010&lt;/option&gt;
                      &lt;option value="2009" &gt;2009&lt;/option&gt;
                      &lt;option value="2008" &gt;2008&lt;/option&gt;
                      &lt;option value="2007" &gt;2007&lt;/option&gt;
                      &lt;option value="2006" &gt;2006&lt;/option&gt;
                      &lt;option value="2005" &gt;2005&lt;/option&gt;
                      &lt;option value="2004" &gt;2004&lt;/option&gt;
                      &lt;option value="2003" &gt;2003&lt;/option&gt;
                      &lt;option value="2002" &gt;2002&lt;/option&gt;
                      &lt;option value="2001" &gt;2001&lt;/option&gt;
                      &lt;option value="2000" &gt;2000&lt;/option&gt;
                      &lt;option value="1999" &gt;1999&lt;/option&gt;
                      &lt;option value="1998" &gt;1998&lt;/option&gt;
                      &lt;option value="1997" &gt;1997&lt;/option&gt;
                      &lt;option value="1996" &gt;1996&lt;/option&gt;
                      &lt;option value="1995" &gt;1995&lt;/option&gt;
                      &lt;option value="1994" &gt;1994&lt;/option&gt;
                      &lt;option value="1993" &gt;1993&lt;/option&gt;
                      &lt;option value="1992" &gt;1992&lt;/option&gt;
                      &lt;option value="1991" &gt;1991&lt;/option&gt;
                      &lt;option value="1990" &gt;1990&lt;/option&gt;
                      &lt;option value="1989" &gt;1989&lt;/option&gt;
                      &lt;option value="1988" &gt;1988&lt;/option&gt;
                      &lt;option value="1987" &gt;1987&lt;/option&gt;
                      &lt;option value="1986" &gt;1986&lt;/option&gt;
                      &lt;option value="1985" &gt;1985&lt;/option&gt;
                      &lt;option value="1984" &gt;1984&lt;/option&gt;
                      &lt;option value="1983" &gt;1983&lt;/option&gt;
                      &lt;option value="1982" &gt;1982&lt;/option&gt;
                      &lt;option value="1981" &gt;1981&lt;/option&gt;
                      &lt;option value="1980" &gt;1980&lt;/option&gt;
                      &lt;option value="1979" &gt;1979&lt;/option&gt;
                      &lt;option value="1978" &gt;1978&lt;/option&gt;
                      &lt;option value="1977" &gt;1977&lt;/option&gt;
                      &lt;option value="1976" &gt;1976&lt;/option&gt;
                      &lt;option value="1975" &gt;1975&lt;/option&gt;
                      &lt;option value="1974" &gt;1974&lt;/option&gt;
                      &lt;option value="1973" &gt;1973&lt;/option&gt;
                      &lt;option value="1972" &gt;1972&lt;/option&gt;
                      &lt;option value="1971" &gt;1971&lt;/option&gt;
                      &lt;option value="1970" &gt;1970&lt;/option&gt;
                      &lt;option value="1969" &gt;1969&lt;/option&gt;
                      &lt;option value="1968" &gt;1968&lt;/option&gt;
                      &lt;option value="1967" &gt;1967&lt;/option&gt;
                      &lt;option value="1966" &gt;1966&lt;/option&gt;
                      &lt;option value="1965" &gt;1965&lt;/option&gt;
                      &lt;option value="1964" &gt;1964&lt;/option&gt;
                      &lt;option value="1963" &gt;1963&lt;/option&gt;
                      &lt;option value="1962" &gt;1962&lt;/option&gt;
                      &lt;option value="1961" &gt;1961&lt;/option&gt;
                      &lt;option value="1960" &gt;1960&lt;/option&gt;
                      &lt;option value="1959" &gt;1959&lt;/option&gt;
                      &lt;option value="1958" &gt;1958&lt;/option&gt;
                      &lt;option value="1957" &gt;1957&lt;/option&gt;
                      &lt;option value="1956" &gt;1956&lt;/option&gt;
                      &lt;option value="1955" &gt;1955&lt;/option&gt;
                      &lt;option value="1954" &gt;1954&lt;/option&gt;
                      &lt;option value="1953" &gt;1953&lt;/option&gt;
                      &lt;option value="1952" &gt;1952&lt;/option&gt;
                      &lt;option value="1951" &gt;1951&lt;/option&gt;
                      &lt;option value="1950" &gt;1950&lt;/option&gt;
                      &lt;option value="1949" &gt;1949&lt;/option&gt;
                      &lt;option value="1948" &gt;1948&lt;/option&gt;
                      &lt;option value="1947" &gt;1947&lt;/option&gt;
                      &lt;option value="1946" &gt;1946&lt;/option&gt;
                      &lt;option value="1945" &gt;1945&lt;/option&gt;
                      &lt;option value="1944" &gt;1944&lt;/option&gt;
                      &lt;option value="1943" &gt;1943&lt;/option&gt;
                      &lt;option value="1942" &gt;1942&lt;/option&gt;
                      &lt;option value="1941" &gt;1941&lt;/option&gt;
                      &lt;option value="1940" &gt;1940&lt;/option&gt;
                      &lt;option value="1939" &gt;1939&lt;/option&gt;
                      &lt;option value="1938" &gt;1938&lt;/option&gt;
                      &lt;option value="1937" &gt;1937&lt;/option&gt;
                      &lt;option value="1936" &gt;1936&lt;/option&gt;
                      &lt;option value="1935" &gt;1935&lt;/option&gt;
                      &lt;option value="1934" &gt;1934&lt;/option&gt;
                      &lt;option value="1933" &gt;1933&lt;/option&gt;
                      &lt;option value="1932" &gt;1932&lt;/option&gt;
                      &lt;option value="1931" &gt;1931&lt;/option&gt;
                      &lt;option value="1930" &gt;1930&lt;/option&gt;
                      &lt;option value="1929" &gt;1929&lt;/option&gt;
                      &lt;option value="1928" &gt;1928&lt;/option&gt;
                      &lt;option value="1927" &gt;1927&lt;/option&gt;
                      &lt;option value="1926" &gt;1926&lt;/option&gt;
                      &lt;option value="1925" &gt;1925&lt;/option&gt;
                      &lt;option value="1924" &gt;1924&lt;/option&gt;
                      &lt;option value="1923" &gt;1923&lt;/option&gt;
                      &lt;option value="1922" &gt;1922&lt;/option&gt;
                      &lt;option value="1921" &gt;1921&lt;/option&gt;
                      &lt;option value="1920" &gt;1920&lt;/option&gt;
                      &lt;option value="1919" &gt;1919&lt;/option&gt;
                      &lt;option value="1918" &gt;1918&lt;/option&gt;
                      &lt;option value="1917" &gt;1917&lt;/option&gt;
                      &lt;option value="1916" &gt;1916&lt;/option&gt;
                      &lt;option value="1915" &gt;1915&lt;/option&gt;
                      &lt;option value="1914" &gt;1914&lt;/option&gt;
                      &lt;option value="1913" &gt;1913&lt;/option&gt;
                      &lt;option value="1912" &gt;1912&lt;/option&gt;
                      &lt;option value="1911" &gt;1911&lt;/option&gt;
                      &lt;option value="1910" &gt;1910&lt;/option&gt;
                      &lt;option value="1909" &gt;1909&lt;/option&gt;
                      &lt;option value="1908" &gt;1908&lt;/option&gt;
                      &lt;option value="1907" &gt;1907&lt;/option&gt;
                      &lt;option value="1906" &gt;1906&lt;/option&gt;
                      &lt;option value="1905" &gt;1905&lt;/option&gt;
                      &lt;option value="1904" &gt;1904&lt;/option&gt;
                      &lt;option value="1903" &gt;1903&lt;/option&gt;
                      &lt;option value="1902" &gt;1902&lt;/option&gt;
                      &lt;option value="1901" &gt;1901&lt;/option&gt;
                      &lt;option value="1900" &gt;1900&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/fieldset&gt;
              &lt;input type="hidden" name="date_of_birthsubmit" id="date_of_birthsubmit" value="true" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
          &lt;p&gt;After entering your date of birth, click the 'Calculate Fee' button to determine what your one-time cost of lifetime membership will be.&lt;/p&gt;
          &lt;div id="calculateAge" class="step-button next-step"&gt; Calculate Fee &lt;/div&gt;
          &lt;p id="feeInfo" style="display: none;"&gt;Your &lt;span class="paymentNumber"&gt;one time fee&lt;/span&gt; for lifetime membership totals just &lt;span class="memberFee"&gt;&lt;/span&gt; today.&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div id="250group" style="display: none;"&gt;
          &lt;p&gt;
              &lt;label&gt;
                  &lt;input id="fee250_0" name="fee250" type="radio" value="250s" /&gt;
                  Single
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee250_1" name="fee250" type="radio" value="250q" /&gt;
                  Quarterly
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee250_2" name="fee250" type="radio" value="250m" /&gt;
                  Monthly
              &lt;/label&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div id="230group" style="display: none;"&gt;
          &lt;p&gt;
              &lt;label&gt;
                  &lt;input id="fee230_0" name="fee230" type="radio" value="230s" /&gt;
                  Single
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee230_1" name="fee230" type="radio" value="230q" /&gt;
                  Quarterly
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee230_2" name="fee230" type="radio" value="230m" /&gt;
                  Monthly
              &lt;/label&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div id="180group" style="display: none;"&gt;
          &lt;p&gt;
              &lt;label&gt;
                  &lt;input id="fee180_0" name="fee180" type="radio" value="180s" /&gt;
                  Single
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee180_1" name="fee180" type="radio" value="180q" /&gt;
                  Quarterly
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee180_2" name="fee180" type="radio" value="180m" /&gt;
                  Monthly
              &lt;/label&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div id="140group" style="display: none;"&gt;
          &lt;p&gt;
              &lt;label&gt;
                  &lt;input id="fee140_0" name="fee140" type="radio" value="140s" /&gt;
                  Single
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee140_1" name="fee140" type="radio" value="140q" /&gt;
                  Quarterly
              &lt;/label&gt;
              &lt;br /&gt;
              &lt;label&gt;
                  &lt;input id="fee140_2" name="fee140" type="radio" value="140m" /&gt;
                  Monthly
              &lt;/label&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And the script: </p>
  
  <pre><code>var $j = jQuery.noConflict();
  var $ = $j; 
  
  function calcAge(dateString) {
      var birthday = +new Date(dateString);
      return ~~((Date.now() - birthday) / (31557600000));
  }
  
  $j(document).ready(function() {
      $j( "#calculateAge" ).click(function getdateString() { 
          var dobYear = $j("#date_of_birth_date_YEAR").val();
          var dobMonth = $j("#date_of_birth_date_MONTH").val();
          var goodMonth =  ( '0' + (dobMonth) ).slice( -2 );
          var dobDay = $j("#date_of_birth_date_DAY").val();
          var goodDay =  ( '0' + (dobDay) ).slice( -2 );
          var dateString = dobYear+"/"+goodMonth+"/"+goodDay;
          var ageRange = calcAge(dateString);
  
          // alert(ageRange);
          // alert(dateString);
  
          if (ageRange &lt; 41) {
              $j("#250group, #feeInfo").css("display","inline");
              $j("#140group, #230group, #180group").css("display","none");
              $j("#level_installmentexpanded15681, #level_installmentexpanded15684, #level_installmentexpanded15686").prop('checked',false);
              $j("#level_installmentexpanded15683").prop('checked',true);
              $j(".memberFee").html("$250.00");
  
              // CleanUp();
          }
          else if (ageRange &lt; 61) {
              $j("#230group, #feeInfo").css("display","inline");
              $j("#250group, #140group, #180group").css("display","none");
              $j("#level_installmentexpanded15683, #level_installmentexpanded15686, #level_installmentexpanded15681").prop('checked',false);
              $j("#level_installmentexpanded15684").prop('checked',true);
              $j(".memberFee").html("$230.00");
  
              // CleanUp();
          }
          else if (ageRange &lt; 71) {
              $j("#180group, #feeInfo").css("display","inline");
              $j("#250group, #230group, #140group").css("display","none");
              $j("#level_installmentexpanded15683, #level_installmentexpanded15684, #level_installmentexpanded15681").prop('checked',false);
              $j("#level_installmentexpanded15686").prop('checked',true);
              $j(".memberFee").html("$180.00");
  
              //  CleanUp();
          }
          else if (ageRange &lt; 80) {
              $j("#140group, #feeInfo").css("display","inline");
              $j("#250group, #230group, #180group").css("display","none");
              $j("#level_installmentexpanded15683, #level_installmentexpanded15684, #level_installmentexpanded15686").prop('checked',false);
              $j("#level_installmentexpanded15681").prop('checked',true);
              $j(".memberFee").html("$140.00");
  
              //  CleanUp();
          }
          else if (ageRange &gt; 79) {
              window.location = 'http://externalsurvey.org/site/Survey?ACTION_REQUIRED=URI_ACTION_USER_REQUESTS&amp;SURVEY_ID=####';
          }
          else {
              $j('.don-tb tr').css("display","inline");
  
              //  CleanUp();
          } 
      });
  })
  
  $j( "#fee250_0" ).click(function() {
      $j("#level_installmentduration").val("S:0");
      $j(".memberFee").html("$250.00");
      $j(".paymentNumber").html("one time fee");
  });
  $j( "#fee250_1" ).click(function() {
      $j("#level_installmentduration").val("Q:9");
      $j(".memberFee").html("$30.00");
      $j(".paymentNumber").html("9 easy quarterly payments");
  });
  $j( "#fee250_2" ).click(function() {
      $j("#level_installmentduration").val("M:25");
      $j(".memberFee").html("$10.00");
      $j(".paymentNumber").html("25 easy monthly payments");
  });
  $j( "#fee230_0" ).click(function() {
      $j("#level_installmentduration").val("S:0");
      $j(".memberFee").html("$230.00");
      $j(".paymentNumber").html("one time fee");
  });
  $j( "#fee230_1" ).click(function() {
      $j("#level_installmentduration").val("Q:8");
      $j(".memberFee").html("$30.00");
      $j(".paymentNumber").html("8 easy quarterly payments");
  });
  $j( "#fee230_2" ).click(function() {
      $j("#level_installmentduration").val("M:23");
      $j(".memberFee").html("$10.00");
      $j(".paymentNumber").html("23 easy monthly payments");
  });
  $j( "#fee180_0" ).click(function() {
      $j("#level_installmentduration").val("S:0");
      $j(".memberFee").html("$180.00");
      $j(".paymentNumber").html("one time fee");
  });
  $j( "#fee180_1" ).click(function() {
      $j("#level_installmentduration").val("Q:6");
      $j(".memberFee").html("$30.00");
      $j(".paymentNumber").html("6 easy quarterly payments");
  });
  $j( "#fee180_2" ).click(function() {
      $j("#level_installmentduration").val("M:18");
      $j(".memberFee").html("$10.00");
      $j(".paymentNumber").html("18 easy monthly payments");
  });
  $j( "#fee140_0" ).click(function() {
      $j("#level_installmentduration").val("S:0");
      $j(".memberFee").html("$140.00");
      $j(".paymentNumber").html("one time fee");
  });
  $j( "#fee140_1" ).click(function() {
      $j("#level_installmentduration").val("Q:5");
      $j(".memberFee").html("$30.00");
      $j(".paymentNumber").html("5 easy quarterly payments");
  });
  $j( "#fee140_2" ).click(function() {
      $j("#level_installmentduration").val("M:14");
      $j(".memberFee").html("$10.00");
      $j(".paymentNumber").html("14 easy monthly payments");
  });
  </code></pre>
  
  <p>I hate to post a 'what's wrong with this' question, but I'm stumped and I was hoping to get some insight before trying other methods to test in older browsers. The level_installment id's are part of the structure of a CRM and can be ignored for this.</p>
  
  <p>I have the alerts set up and currently commented out, but those tend to report the most crucial data-steps for my other testing. They are meant to give out a discrete age, e.g. 43 or date, e.g. 12/11/2013. In my reverse browser standards testing, these came out cleanly.</p>