1 Reply Latest reply on Mar 29, 2018 6:01 PM by Sanford Whiteman

    Forms stuck on "Please Wait" in IE 11 only

    Ula Kuras

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

       

      please-wait-error.png

       

      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?

        • Re: Forms stuck on "Please Wait" in IE 11 only
          Sanford Whiteman

          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.