define an IFRAME function to fix a bug on IE6 and IE7 to avoid to open a new window
--- a/web/data/cubicweb.compat.js Tue Mar 17 19:28:11 2009 +0100
+++ b/web/data/cubicweb.compat.js Wed Mar 18 15:09:31 2009 +0100
@@ -242,7 +242,36 @@
UL = createDomFunction('ul');
// cubicweb specific
-IFRAME = createDomFunction('iframe');
+//IFRAME = createDomFunction('iframe');
+function IFRAME(params){
+ if ('name' in params){
+ try {
+ var node = document.createElement('<iframe name="'+params['name']+'">');
+ }catch (ex) {
+ var node = document.createElement('iframe');
+ }
+ }
+ else{
+ var node = document.createElement('iframe');
+ }
+ for (key in params) {
+ if (key != 'name'){
+ var value = params[key];
+ if (key.substring(0, 2) == 'on') {
+ // this is an event handler definition
+ if (typeof value == 'string') {
+ // litteral definition
+ value = new Function(value);
+ }
+ node[key] = value;
+ } else { // normal node attribute
+ node.setAttribute(key, params[key]);
+ }
+ }
+ }
+ return node;
+}
+
// dummy ultra minimalist implementation on deferred for jQuery
function Deferred() {