title: Javascript - How to disable the print dialog after first show?
body: <p>On one of our pages the user has the option to print a selected list of html pages. This is how it is at the moment</p>
  
  <pre><code>var rowcount = FrmMain.RowCount;
  var frame = FrmMain.Frame;
  for(i=1;i&lt;=rowcount;i++)
  {
      var obj = FrmMain.elements("chk_" + i);
      if(obj.checked)
      {
          frame.src = FrmMain.elements("hpath" + i).value;
          window.frames[frame.id].focus();
          window.frames[frame.id].print();
      }
  }
  </code></pre>
  
  <p>Now this works fine. The problem is that on each loop the print dialog box is displayed and the user has to click print.</p>
  
  <p>Basically, what I'm asking is whether that is a way to supress this dialog. It must appear at the first time but hide thereafter. Some thing like below</p>
  
  <pre><code>var show = true;
  ...
  {
      ...
      {
          ...
          if(show)
          {
              window.frames[frame.id].focus();
              window.frames[frame.id].print();
              show = false;
          }
          else
          {
              window.frames[frame.id].focus();
              window.frames[frame.id].printwithoutdialog();
          }
      }
  }
  </code></pre>
  
  <p>I hope I've been clear. Thanks in advance.</p>