10 Replies Latest reply: May 7, 2013 1:59 AM by udaykiran pulipati RSS

RichFaces - JavaScript error in IE8

nraf Newbie

I am getting a strange error in IE8 when trying to reRender an element inside of a a4j:repeat using ajaxKeys. When I try to render an output panel I'm getting the following message:


Unknown runtime error  3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript, line 120 character 1


I put in a breakpoint using Developer Tools and found that it's giving an error at:

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


I've looked at the source and the following is the code segment being run.

var anchor = oldnode.parentNode;
   if(!window.opera && !A4J.AJAX.isWebkitBreakingAmps() && oldnode.outerHTML && !oldnode.tagName.match( /(tbody|thead|tfoot|tr|th|td)/i ) ){
             LOG.debug("Replace content of node by outerHTML()");
             if (!Sarissa._SARISSA_IS_IE || oldnode.tagName.toLowerCase()!="table") {
              try {
               oldnode.innerHTML = "";
              } catch(e){    
               LOG.error("Error to clear node content by innerHTML "+e.message);
             oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);


The element is a span (defined as a4j:outputPanel) so both if statements are executed. It's getting past the try block successfully but is crashing at the final node.


The outputPanel is nested in a a4j:repeat (so there are many of these panels) and I'm using a js:Function and ajaxKeys to perform an update and reRender a specific. This is working fine in FF and Chrome but in IE8 (haven't tested other versions), the entire panel is disappearing.


Any ideas why this is occuring?