Ajax request issue in IE9 using Richfaces 3.3.3 Final

jsf, richfaces

Solution

Tempororily i resolve the problem by replacing the below lines. It works fine.

Find the file AJAX.js in richfaces-impl.jar

Location : /org/ajax4jsf/javascript/scripts/AJAX.js

line number 1398

      oldnode.outerHTML = new XMLSerializer().serializeToString(newnode); 

and replace it by

  if (typeof window.XMLSerializer != "undefined") 
   {
      oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);
   } 
   else if (typeof xmlNode.xml != "undefined") 
   {
      oldnode.outerHTML = xmlNode.xml;
   }

line number 1627

        dst.setAttribute(attr,value);

and replace by adding try, catch

try 
{
        dst.setAttribute(attr, value);
    }
catch (err) 
{
        //alert('Error');
    }

(or)

make a copy of AJAX.js file and modified the above lines and include this file into your main page that will replace the old one.

Problem

I am using richfaces 3.3.3 Final and JSF 2.0, some times any of the ajax request occurs a script error will appear like " SCRIPT87: Invalid argument. 3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript, line 143 character 96 " It appears only in IE 9. After refreshing the page it works fine.

Original source

Related problems