Iframe resize III

摘要:Iframe resize III

= = |,resize竟然會和ckeditor相衝,打開ckeditor的form時Iframe沒辦法正確的resize畫面的大小

最後用了一招,先檢查有沒ckeditor的content,有的話把iframe裡面的fomr強迫設整個form的height

function resize(FramID)
{
var Framobj=document.getElementById(FramID);
  if (document.getElementById){
   if (Framobj && !window.opera){
    if (Framobj.contentDocument && Framobj.contentDocument.body.offsetHeight){
     Framobj.height = Framobj.contentDocument.body.offsetHeight;
    }else if(Framobj.Document && Framobj.Document.body.scrollHeight){
     Framobj.height = Framobj.Document.body.scrollHeight;
    }   }  }
  if (Framobj.Document.getElementById('Content') != null){Framobj.height =750;}
 }