Author: almaw Date: Tue Jun 5 10:17:27 2007 New Revision: 544558 URL: http://svn.apache.org/viewvc?view=rev&rev=544558 Log: Fix for firefox AJAX status issue.
Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?view=diff&rev=544558&r1=544557&r2=544558 ============================================================================== --- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Tue Jun 5 10:17:27 2007 @@ -499,7 +499,7 @@ this.channels = new Array(); }, - // Schedules the callback to channel with given name. + // Schedules the callback to channel with given name. schedule: function(channel, callback) { var c = this.channels[channel]; if (c == null) { @@ -736,7 +736,14 @@ var t = this.transport; if (t != null && t.readyState == 4) { - if (t.status == 200) { + try { + status = t.status; + } + catch (e) { + Wicket.Log.error("Exception evaluating AJAX status: " + e); + status = "unavailable"; + } + if (status == 200) { // response came without error var responseAsText = t.responseText; @@ -781,7 +788,7 @@ } else { // when an error happened var log = Wicket.Log.error; - log("Received Ajax response with code: " + t.status); + log("Received Ajax response with code: " + status); this.done(); this.failure(); }