title: Javascript - Trying to make it wait
body: <p>Okay, So I'm trying to have this code display text at different intervals in a specific div. "text1" appears in the div normally but after a few secs the page loads everything disappears and the text is visible but on a blank page.</p>
  
  <p>Could someone help me so text2 and text3 appear in the div with the rest of the content.</p>
  
  <p>Thanks. </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function typeText1()
      {
          document.write('&lt;p style="color:blue;"&gt;text1&lt;/p&gt;');
          setTimeout( "typeText2();", 1000);
      }
      function typeText2()
      {
          document.write('&lt;p style="color:blue;"&gt;text2&lt;/p&gt;');
          setTimeout( "typeText3();", 3000);
      }
      function typeText3()
      {
          document.write('&lt;p style="color:blue;"&gt;text3&lt;/p&gt;');
      }
      typeText1();
      &lt;/script&gt;
  </code></pre>