R – form.submit() not working in IE8 – “class not registered”

cross-browserinternet-explorer-8

Does anyone know why the last line of this function, form.submit(), throws a "class not registered" error in IE8?

//capture the map dimensions and submit the form to fetch a GPX file   
GMap2.prototype.downloadGPX = function(input) {
  var form = input.parentNode;
  form.swx.value = this.getBounds().getSouthWest().x
  form.swy.value = this.getBounds().getSouthWest().y
  form.nex.value = this.getBounds().getNorthEast().x
  form.ney.value = this.getBounds().getNorthEast().y
  form.zoom.value = this.getZoom();
  form.submit();
}

Best Solution

The reason this doesn't work is because I set form.target, and you can't use .target in IE8.

Related Question