[javascript] fix IFRAME implementation and make it work in IE 6/7 + FF3 with text/html served pages stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 28 Jul 2009 21:11:10 +0200
branchstable
changeset 2537 73c83c14dd2c
parent 2482 dead2d56f711
child 2538 6f8ffaa2a700
child 2566 714a8743d423
[javascript] fix IFRAME implementation and make it work in IE 6/7 + FF3 with text/html served pages For more information : - http://groups.google.com/group/comp.lang.javascript/msg/510f639e1fdebcc8 - http://msdn.microsoft.com/en-us/library/ms536389%28VS.85%29.aspx
web/data/cubicweb.compat.js
--- a/web/data/cubicweb.compat.js	Fri Jul 24 14:37:05 2009 +0200
+++ b/web/data/cubicweb.compat.js	Tue Jul 28 21:11:10 2009 +0200
@@ -247,9 +247,10 @@
   if ('name' in params){
     try {
       var node = document.createElement('<iframe name="'+params['name']+'">');
-      }catch (ex) {
-	 var node = document.createElement('iframe');
-      }
+    } catch (ex) {
+      var node = document.createElement('iframe');
+      node.id = node.name = params.name;
+    }
   }
   else{
     var node = document.createElement('iframe');