[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1324) javascript error in IE6 when remote call does not render anything to response.

Keith Naas (JIRA) jira-events at lists.jboss.org
Tue May 15 10:48:52 EDT 2007


javascript error in IE6 when remote call does not render anything to response.
------------------------------------------------------------------------------

                 Key: JBSEAM-1324
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1324
             Project: JBoss Seam
          Issue Type: Bug
          Components: Remoting
            Reporter: Keith Naas
         Assigned To: Shane Bryzak


If an exception occurs in the remote call, it is caught by the ExecutionHandler, logged, and the request is ended.  Since nothing is written to the response, the document is empty.  In IE6 this causes a javascript error.

Something like this should get rid of the problem.

### Eclipse Workspace Patch 1.0
#P jboss-seam
Index: src/remoting/org/jboss/seam/remoting/remote.js
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/remoting/org/jboss/seam/remoting/remote.js,v
retrieving revision 1.3
diff -u -r1.3 remote.js
--- src/remoting/org/jboss/seam/remoting/remote.js	1 May 2007 00:08:12 -0000	1.3
+++ src/remoting/org/jboss/seam/remoting/remote.js	15 May 2007 14:39:58 -0000
@@ -624,13 +624,16 @@
   var bodyNode;
   var context = new Seam.Remoting.__Context;
 
-  for (var i = 0; i < doc.documentElement.childNodes.length; i++)
+  if (doc.documentElement)
   {
-    var node = doc.documentElement.childNodes.item(i);
-    if (node.tagName == "header")
-      headerNode = node;
-    else if (node.tagName == "body")
-      bodyNode = node;
+    for (var i = 0; i < doc.documentElement.childNodes.length; i++)
+    {
+      var node = doc.documentElement.childNodes.item(i);
+      if (node.tagName == "header")
+        headerNode = node;
+      else if (node.tagName == "body")
+        bodyNode = node;
+    }
   }
 
   if (headerNode)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list