Author: jonathan
Date: Tue Dec  4 12:23:15 2007
New Revision: 10496

Log:

Fixed MASHUP-266 by adding IE-specific workaround.

Modified:
   trunk/commons/dynamic-codegen/src/tryit.xslt

Modified: trunk/commons/dynamic-codegen/src/tryit.xslt
==============================================================================
--- trunk/commons/dynamic-codegen/src/tryit.xslt        (original)
+++ trunk/commons/dynamic-codegen/src/tryit.xslt        Tue Dec  4 12:23:15 2007
@@ -67,6 +67,25 @@
 </xsl:text>
             <script type="text/javascript{$e4x-param}">
     var browser = WSRequest.util._getBrowser();
+
+    // Workaround for IE, which treats ids as case insensitive, compliments of 
Mike Bulman.
+    if (browser == "ie" || browser == "ie7") {
+        document._getElementById = document.getElementById;
+        document.getElementById = function(id) {
+            var a = [];
+            var o = document._getElementById(id);
+            if (!o) return o;
+            while (o &amp;&amp; o.id != id) {
+                a.push({i:o.id,e:o});
+                o.id='';
+                o = document._getElementById(id);
+            }
+            for (j=0,jj=a.length; j&lt;jj; j++) a[j].e.id = a[j].i;
+            a = null;
+            return o;
+        }
+    }
+
     var formatxml = null;
     var xsltready = false;
 

_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev

Reply via email to