2010-10-01 65 views
0

您好我有一個div框在我的頁面上打開,然後加載一個包含CKeditor的HTML文件來處理文本區域。問題是,如果我在瀏覽器中查看html文件,一切運作良好,我有所有的編輯選項。當我在JS腳本中使用它時,我什麼也得不到。任何人都可以幫助我嗎?文本編輯器(ckeditor)不工作在我的DIV框中

的JS代碼,這是否是在這裏

 $(document).ready(function(){ 

       $('#'+divbox).load('../customer_rm/display_email_send.php', function() { 
         // once loaded 
        CKEDITOR.replace('mail_body'); 

和工作HTML文件是在這裏

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> 
    <html xmlns='http://www.w3.org/1999/xhtml'> 

    <head> 
    <script type="text/javascript" src="ckeditor/ckeditor.js"></script> 
    </head> 
    <body> 


    <style type='text/css'> 
    table.t {border: 1px solid black} 
    td, tr {border: 0} 

    .bdr { 
     border: 4px solid black ; 
    } 
    .white { 
     background-color:#FFF ; 
    } 

    </style> 

    <div align='center'> 

    <br><br /> 

    <table id='t' width='700' border='2' bgcolor='#ccc'> 
     <tr > 
     <td width='20'>&nbsp;</td> 
     <td width='50'>&nbsp;</td> 
     <td width='50'>&nbsp;</td> 
     <td >&nbsp;</td> 
     <td width='20' >&nbsp;</td>  

     </tr> 

     <tr> 
     <td>&nbsp;</td> 
     <td rowspan='3'> 
     <input type='button'id='send' value='Send' 
     style='width:60px; height:40px ' 
     /><hr> 
     <input type='button' value='Close' 
     style='width:60px; height:20px '      onclick='fadeout()' 
     /> 
     </td> 
     <td><input type='button' value='To :' /></td> 
     <td><input type='text' class='white' id='mailto' size='80' /></td> 
     <td>&nbsp;</td> 
     </tr> 

     <tr> 
     <td>&nbsp;</td> 

     <td><input type='button' value='Cc :' /></td> 
     <td><input type='text' class='white' id='mailcc' name='mailcc' size='80' /></td> 
     <td>&nbsp;</td> 
     </tr> 
     <tr> 
     <td>&nbsp;</td> 

     <td><input type='button' value='Bcc :' id='bcc' /></td> 
     <td><input type='text' class='white' id='mailbcc' size='80' /></td> 
     <td>&nbsp;</td> 
     </tr> 
     <tr> 
     <td>&nbsp;</td> 
     <td><input type='button' value='Subject' 
     style='width:60px; height:20px '      onclick='fadeout()' 
     /></td> 
     <td colspan='2'><input type='text' class='white' id='subject' size='89' /></td> 


     <td>&nbsp;</td> 
     </tr> 
     <tr> 
     <td>&nbsp;</td> 
     <td colspan='3'> 
      <textarea id='mail_body' class='white' style='height:380px; width:600px; bgcolor:#fff ' > 
      </textarea> 
     </td> 
     <td>&nbsp;</td> 
     </tr> 
     <tr> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     </tr> 
     <tr> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     <td>&nbsp;</td> 
     </tr> 

    </table> 


    </div> 

回答