Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/03/2010, 16:44
Avatar de pato12
pato12
 
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 7 meses
Puntos: 101
Problema con editar iframe

Hola,
Intento editar un iframe, anda bien en Google Chrome, Opera, Safari. Pero en Firefox e IE no anda :S
Código Javascript:
Ver original
  1. this.init=function(){
  2.         var iframe=document.createElement('iframe'),_size=this.getSize(_id),dom=document.getElementById(_id);
  3.             iframe.src='about:blank';
  4.             iframe.id='halfeditor_html_'+_id;
  5.             iframe.style.height=_size[0];
  6.             iframe.style.width=_size[1];
  7.             iframe.style.display='';
  8.             iframe.className=elwin._class;
  9.            
  10.             dom.parentNode.insertBefore(iframe,dom);
  11.             dom.style.display='none';
  12.         // Hasta aquí anda bien en IE 
  13.         var _edit=iframe.contentDocument || iframe.contentWindow.document,_iframe_body=_edit.body || _edit.getElementsByTagName('body')[0];
  14.         if(_iframe_body.contentEditable)
  15.             _iframe_body.contentEditable = true;
  16.         else
  17.             _iframe_body.designMode = 'on';
  18.        
  19.         for(_s in elwin._style_iframe)
  20.             _iframe_body.style[_s]=elwin._style_iframe[_s];
  21.     };
Gracias
Salu2
__________________
Half Music - www.halfmusic.com