Forms stuck on "Please Wait" in IE 11 only | Community
Skip to main content
March 30, 2018
Question

Forms stuck on "Please Wait" in IE 11 only

  • March 30, 2018
  • 1 reply
  • 2199 views

The forms will not submit in IE 11, they get hung up on "Please Wait"

I get the following javascript error: SCRIPT438: Object doesn't support property or method 'remove' - referring to the line in bold. This error only occurs in IE.

function(form){

  var mktoForm = document.getElementById('mktoForm_1019'),

      formSuccess = document.getElementById('form_success_1019');

  mktoForm.querySelector('style').remove();

  form.onSuccess(function(){

    formSuccess.innerHTML = "Thanks for your submission!";

    mktoForm.setAttribute("style", "visibility: hidden; position: absolute;");

    return false;

  }); 

});

Has anyone every experienced this before? Or have some idea on how to fix it?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
March 30, 2018

This isn't a Forms 2.0 problem.

You obviously can't call DOM methods that aren't supported cross-browser. (And it's not just IE 11, it's IE 8, 9, 10, and 11.)

Use

  var styleEl = mktoForm.querySelector('style');

  styleEl.parentNode.removeChild(styleEl);

Also I'm not sure why you're removing a <style> element.  There are always better ways to use the CSSOM.