title: TypeError:Cannot read property 'getElementById' frameset
body: <p>I have a simple code that refreshes the main page each time there is a new version, but it only works in Internet Explorer. In other browsers I get the following error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'getElementById' of undefined line 24
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>    &lt;html&gt;
  
      &lt;script type="text/javascript"&gt;
       var num=0;
       var currVersion;
       var started=false;
  
       function startLoad() {
       var url= "version_telemark.html?"+ (++num);
          window.version.navigate(url);
       }
  
       function endLoad() {
         if (started) {
           var newVersion = version.document.getElementById("version").value;
           if (newVersion != currVersion) {
             currVersion=newVersion;
             var url  = "telemark.html?"+ (++num);
               window.pane.navigate(url);
           }
         }
       }
       function start() {
          currVersion = version.document.getElementById("version").value;
         started=true;
         setInterval("startLoad()", 200);
       }
      &lt;/script&gt;
  
    &lt;frameset    onload="start()"  cols="40%,100%"&gt;
      &lt;frame id="version"   src="version_telemark.html"/&gt;
      &lt;frame id="pane" src="telemark.html" /&gt;
    &lt;/frameset&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and in my other file I only have that I wish to edit I have:</p>
  
  <pre><code>&lt;input id="version" name="version" type="textbox" value="700"&gt;
  </code></pre>
  
  <p>and my other file that has the <em>design</em> just has tables but we wont need to add anything there.</p>