2 Replies Latest reply on Apr 28, 2010 2:20 PM by nbelaevski

    Richfaces 3.3.3.final js Error in Ie6

    peruzzo

      In ie6, the RichFaces 3.3.3.FINAL simply hangs. Lock even with the live demo.
      Searching for the error, I discovered that it is in the script ua.pack.js.jsf. The method with the error:

       

      var onDomLoad = function() {
              if (!ua.w3cdom) {
                  return;
              }
              addDomLoadEvent(main);
              if (ua.ie && ua.win) {

                  //The error is this try

                  try {     // Avoid a possible Operation Aborted error
                      doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
                      script = getElementById("__ie_ondomload");
                      if (script) {
                          addListener(script, "onreadystatechange", checkReadyState);
                      }
                  }
                  catch(e) {}
              }

       

      I tested the version of RichFaces 3.3.2.SR1 and it works in ie6. The method of this release is:

       

      var onDomLoad = function() {
              if (!ua.w3cdom) {
                  return;
              }
              addDomLoadEvent(main);
              if (ua.ie && ua.win) {          
                  try {     // Avoid a possible Operation Aborted error
                      doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
                      script = getElementById("__ie_ondomload");
                      if (script) {
                          addListener(script, "onreadystatechange", checkReadyState);
                      }
                  }
                  catch(e) {}
              }


      What can be done to correct this, since with this error, we lose the compatibility of RichFaces for ie6?

        • 1. Re: Richfaces 3.3.3.final js Error in Ie6
          pyaschenko

          I've checked it on livedemo in IE6. Works fine for me.

          This is code from swfobject.js and here is the code from 3.3.3 final:

           

          var onDomLoad = function() {

               if (!ua.w3cdom) {
                    return;
               }
               addDomLoadEvent(main);
               if (ua.ie && ua.win) {
                    try {      // Avoid a possible Operation Aborted error
                         var head = doc.getElementsByTagName("head")[0]||document.documentElement;
                         script = doc.createElement("script");
                         script.setAttribute("defer","defer");
                         script.setAttribute("src","//:");
                         head.appendChild(script);
                         addListener(script, "onreadystatechange", checkReadyState);
                    }
                    catch(e) {}
               }
          Seems like a browser cache issue.
          • 2. Re: Richfaces 3.3.3.final js Error in Ie6
            nbelaevski

            I've tried a4j:support page at livedemo - works ok for me in IE6.