4

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.

newuser
  • 8,338
  • 2
  • 25
  • 33
  • +1 I'm also seeing these issues like ajax stuff not working in IE. After trying to debug my own app, I just tried showcase & to my surprise even their showcase isn't working correctly for ajax stuff on IE 10! (not using compatibility mode in IE). – Rajat Gupta Oct 28 '13 at 17:42

2 Answers2

3

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.

newuser
  • 8,338
  • 2
  • 25
  • 33
2

RichFaces 3.x does not support IE9. Refer to this answer for more details: https://stackoverflow.com/a/7326359/854386

Community
  • 1
  • 1
Andrey
  • 6,526
  • 3
  • 39
  • 58