I have created a method to retrieve some data (lat,lon points) and open a window to map them.
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();
}
data variable is populated with the following:
Yet I get the following area on the line:
mapInput.value = data;
See Question&Answers more detail:osERROR: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLFormElement.submit]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.xxx.xxx :: openMapWindow :: line 244" data: no]
Line 0