title: How to make multiple url opener in html and javascript
body: <p>I am making a multiple url opener too in HTML and Javascript. I am getting some problems that HTTP links are opening but HTTPS links are not. Can anyone help me with that? Here is the code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function open_all() {
    var urls = document.getElementById("list_urls").value;
    var urls = urls.split('\n');
    var totalno = urls.length;
    var s;
    for (var i = 0; i &lt; totalno; i++) {
      s = urls[i];
      if (s) {
        if (s.substr(0, 7) != 'http://') {
          s = 'http://' + s;
        }
        window.open(s);
      }
    }
    return false;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form method="post" action=""&gt;
    &lt;br /&gt;
    &lt;textarea name="list_urls" id="list_urls" cols="60" rows="20"&gt;&lt;/textarea&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;input value="Open URLs" class="submit" type="button" onClick="open_all();"&gt;
    &lt;br /&gt;
    &lt;input type="reset" value="Reset!"&gt;
    &lt;br/&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Thanks in advance</p>