title: Using Javascript to dynamically create links that trigger popup windows
body: <p>I've searched high and low, and have not been able to find a solution for what I am trying to do.</p>
  
  <p>I am adding dynamic rows, and doing it by element id, using code such as this:</p>
  
  <pre><code>  var cellRight = row.insertCell(1);
    var el = document.createElement('input');
    el.type = '';
    el.name = 'description' + iteration;
    el.id = 'description' + iteration;
    el.size = 55;
    cellRight.appendChild(el);
  </code></pre>
  
  <p>I have one field where I would like to add a text link, and have it open a new sized window.  A popup, basically.  I have tried many different code snippets I have found, and none of them have done that.  The closest I have come is a new tab in a full page.</p>
  
  <pre><code>  var cellRight = row.insertCell(3);
    var el = document.createElement("td"); 
    var cell=document.createElement('td');
    var link=document.createElement('a');
    link.setAttribute('href','http://www.domain.com/page.php');
    link.setAttribute('target','_blank');
    link.setAttribute('height','400');
    link.setAttribute('width','500');
    link.appendChild(document.createTextNode('Page'));
    cell.appendChild(link);
    el.appendChild(cell);
    cellRight.appendChild(el);
  </code></pre>
  
  <p>I have also tried things like: </p>
  
  <pre><code>link.onclick(window.open('http://www.domain.com/page.php','popUpWindow','height=400,width=500,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
  </code></pre>
  
  <p>and</p>
  
  <pre><code>el.html('&lt;a href="JavaScript:newPopup(\'http://www.domain.com/page.php\');"&gt;Page&lt;/a&gt;');
  </code></pre>
  
  <p>I can make it work in regular javascript with this code, but I use this in the first "row" of inputs, and the element id is being used to create the subsequent dynamic rows.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function newPopup(url) {
      popupWindow = window.open(
  url,'popUpWindow','height=400,width=500,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
  }
  &lt;/script&gt;
  &lt;a href="JavaScript:newPopup('http://www.domain.com/page.php');"&gt;Page&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I hope there is either a link, or an example that someone can offer to help me make this work.</p>
  
  <p>Thanks in advance for your help.</p>