title: Opening a new small window with javascript through HTML
body: <p>I'm trying this for an hour and I can't figure out how to open a small window through HTML link. Basicly.</p>
  
  <pre><code>function myFunction() {
    var waypointsai = document.getElementById('waypointsai');
    var waypointas = document.getElementById('waypoints').value;
  
    waypts.push({
      location: waypointas,
      stopover: true
    });
    atvzd.push(waypointas);
    waypointsai.innerHTML += '&lt;a href="#" onclick="newWindow(' + waypointas + ');"&gt;' + waypointas + '&lt;/a&gt;';
  }
  
  
  waypointsai.innerHTML += '&lt;a href="#" onclick="newWindow(' + waypointas + ');"&gt;' + waypointas + '&lt;/a&gt;';
  </code></pre>
  
  <p>Basicly I need to have a function that opens a new window called <code>/whatever.php?variable=waypointas</code>. And that waypointas is what user inputs to an array.</p>
  
  <p>So let's say my <code>waypointas = tree;</code> How I open a small window called <code>/whatever.php?variable=tree</code> ? I'm out of ideas I hope I clarified my situation clearly.</p>