Ajax request error in IE9 using Richfaces 3.3.3 Final

I use richfaces 3.3.3 Final and JSF 2.0, sometimes some ajax request occurs, a script error appears, like

"SCRIPT87: Invalid argument.

3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript, line 143 characters 96 "

It only appears in IE 9. After refreshing the page, it works great.

+4
source share
2 answers

Temporarily resolve the issue by replacing the lines below. It works great.

Find AJAX.js file in richfaces-impl.jar

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

line number 1398

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

and replace it with

  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 the AJAX.js file and change the lines above and include this file on your main page, which will replace the old one.

+3
source

RichFaces 3.x does not support IE9. See this answer for more details: fooobar.com/questions/1359683 / ...

+2
source

All Articles