title: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFormElement.submit]
body: <p>I have created a method to retrieve some data (lat,lon points) and open a window to map them.</p>
  
  <pre><code>function openMapWindow (data) {
      alert(data);
  
      var mapForm = document.createElement("form");
      mapForm.target = "Map";
      mapForm.method = "POST"; // or "post" if appropriate
      mapForm.action = "/map.php";
  
      var mapInput = document.createElement("input");
      mapInput.type = "text";
      mapInput.name = "addrs";
      mapInput.value = data;
      mapForm.appendChild(mapInput);
  
      document.body.appendChild(mapForm);
  
      window.open("", "Map", "status=0,title=0,height=600,width=800");
  
      mapForm.submit();
  
  }
  </code></pre>
  
  <p>data variable is populated with the following:</p>
  
  <p><img src="https://i.stack.imgur.com/SJvpJ.png" alt="map coorindates"></p>
  
  <p>Yet I get the following area on the line:</p>
  
  <pre><code>mapInput.value = data;
  </code></pre>
  
  <blockquote>
    <p>ERROR: uncaught exception:
    [Exception... "Component returned
    failure code: 0x80004005
    (NS_ERROR_FAILURE)
    [nsIDOMHTMLFormElement.submit]" 
    nsresult: "0x80004005
    (NS_ERROR_FAILURE)"  location: "JS
    frame :: <a href="http://www.xxx.xxx" rel="nofollow noreferrer">http://www.xxx.xxx</a> ::
    openMapWindow :: line 244"  data: no]</p>
    
    <p>Line 0</p>
  </blockquote>