title: Frameborder in JavaScript made iframe
body: <p>I am trying to use lazy loading to make my search engine faster which uses lots of iframes to display different aspects of the results. In the javascript that links the id of the element to the javascript that creates the iframe I have specified frameborder="0". I am asking this question because I want to know if there is another way to get rid of the frameborder because this does not appear to be working. Here is the JavaScript code:</p>
  
  <pre><code>&lt;script&gt;
  //doesn't block the load event
      function createIframe(){
              var i = document.createElement("iframe");
              var a = Math.random() + "";
              var t = a * 10000000000000;
              i.src = "http://harvix.com/images2.cgi?$query";
              i.scrolling = "auto";
              i.frameborder = "0";
              i.width = "100%";
              i.height = "400px";
              document.getElementById("frame1").appendChild(i);
      };
  
      // Check for browser support of event handling capability
      if (window.addEventListener)
      window.addEventListener("load", createIframe, false);
      else if (window.attachEvent)
      window.attachEvent("onload", createIframe);
      else window.onload = createIframe;
  
  &lt;/script&gt;
  </code></pre>
  
  <p>This JavaScript corresponds to this element which is for the iframe placement:</p>
  
  <pre><code>print"&lt;div id=\"frame1\"&gt;&lt;/div&gt;";
  </code></pre>
  
  <p>This all runs in a CGI perl document, hence the print statement.</p>
  
  <p>-Dskrenta</p>