incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1441679 - /incubator/public/trunk/content/votes.xml
Date Sat, 02 Feb 2013 01:40:05 GMT
Author: sebb
Date: Sat Feb  2 01:40:05 2013
New Revision: 1441679

URL: http://svn.apache.org/viewvc?rev=1441679&view=rev
Log:
Fix content error handling

Modified:
    incubator/public/trunk/content/votes.xml

Modified: incubator/public/trunk/content/votes.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/content/votes.xml?rev=1441679&r1=1441678&r2=1441679&view=diff
==============================================================================
--- incubator/public/trunk/content/votes.xml [utf-8] (original)
+++ incubator/public/trunk/content/votes.xml [utf-8] Sat Feb  2 01:40:05 2013
@@ -11,12 +11,13 @@
         fragment_loader = new ActiveXObject("Microsoft.XMLHTTP");
       }
       fragment_loader.onreadystatechange = function() {
-        if (fragment_loader.readyState != 4)
+        if (fragment_loader.readyState != 4) {
           return;
-        if (fragment_loader.status != 200)
-          html = "<p>Content is not available</p>";
-        else {
-          container = document.getElementById("voter").parentNode;
+        }
+        container = document.getElementById("voter").parentNode;
+        if (fragment_loader.status != 200) {
+          container.innerHTML = "<p>Content is not available</p>";
+        } else {
           container.innerHTML = fragment_loader.responseText;
         }
       }



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message