title: document.getElementByID Not Working in IE 8
body: <p>I have never done this before so I apologize if I don't describe my issue good enough or don't use all the right syntax.</p>
  
  <p>What I have on my website is an email form. The user can type in a message, along with their name and some other data. Once they finish filling out the form they can submit it and it goes to my email and all is well. Because the form has JavaScript in it, I automatically had it hidden with CSS and then made it visible through JavaScript. That way if the user has their JavaScript turned off the form won't appear.</p>
  
  <p>And it works great. And I thought it displayed great too. I checked it across all my local testing browsers (Chrome 21, FF 14, IE 9, Opera 12 and Safari 5) as well as through Adobe Browser lab for IE 8, 7 and 6. In all of them it looked fantastic. I even checked it on my Android phone and my girlfriend's Blackberry. It looked fine.</p>
  
  <p>Until I tested it on my mom's computer with IE 8. Although in Adobe Browserlab it says the form displays, in a real test the form doesn't show up.</p>
  
  <p>You can test it for yourself <a href="http://www.dejongdesign.ca/contact/index.html" rel="nofollow">here</a>.</p>
  
  <p>The issue is with the form id, "emailForm". My Form has the markup like so:</p>
  
  <pre><code>    &lt;form id="emailForm" method="POST" action="../javascript/email_form.php" onSubmit="return validateForm();"&gt;
          &lt;label id="emailSubjectLabel"&gt;Email Subject*:&lt;/label&gt;&lt;input class="form" title="Email Subject" type="text" name="subject" id="emailSubject"&gt;&lt;br&gt;
          &lt;label id="nameLabel"&gt;Your Name*:&lt;/label&gt;&lt;input class="form" title="Your Name" type="text" name="name" id="yourName"&gt;&lt;br&gt;
          &lt;label id="emailLabel"&gt;Your Email:&lt;/label&gt;&lt;input class="form" title="Your Email Address" type="text" name="email" id="yourEmail"&gt;&lt;br&gt;
          &lt;label id="messageLabel"&gt;Your Message*:&lt;/label&gt;
          &lt;textarea class="form" title="Write Something..." name="message" id="message" cols="40" rows="5"&gt;&lt;/textarea&gt;
          &lt;input class="button" type="submit" value="Submit"&gt;
          &lt;p class="error"&gt;* required.&lt;/p&gt;
      &lt;/form&gt; 
  </code></pre>
  
  <p>My CSS has a whole bunch of code, but it has this in regards to making the form invisible:</p>
  
  <pre><code>    #emailForm, #javaText {
          display: none;  
      }
  </code></pre>
  
  <p>(note: #javaText is some text on the screen that also is hidden unless the user has JavaScript installed. It also doesn't work in IE 8. Just for simplicity I'm not mentioning it.)</p>
  
  <p>And the JavaScript looks like this:</p>
  
  <pre><code>    document.getElementById("emailForm").style.display = "block";
      document.getElementById("javaText").style.display = "inline";
  
      function validateForm() {
      //function that validates the form
      }
  </code></pre>
  
  <p>I've placed the JavaScript at the bottom of the page, hoping it would help. I've tried changing the style of the content right on the main HTML page, I've checked my mother's JavaScript and it is enabled. I just don't know why it isn't working.</p>
  
  <p>If somebody could tell me what I'm doing wrong, I'd be very thankful. This has been giving me a headache for a week now.</p>
  
  <p>(And yes, I've told her IE sucks and she should go with Chrome, but the reason she doesn't is a whole different story...)</p>
  
  <p>Thanks for your help. I can't wait to hear what the solution is!</p>