tags:

views:

11

answers:

0

Hi I have a html file called 'display_email_send.php' that loads TinyMCE and displays an email type box. I am loading this into my page when the user clicks the relevant button. This displays fine but without the TinyMCE properties. however if I view my php direct in my browser it works fine. Can anyone offer any suggestions please ? I have included the php and the relevent part of the js script below . thanks in advance

  // this is the 'display_email_send.php' 

          <?php
          echo " 
          <script type='text/javascript' src='../tinymce/jscripts/tiny_mce/tiny_mce.js'></script>
          <script type='text/javascript'>
              tinyMCE.init({
                  mode : 'textareas',
                  theme : 'simple'
              });
          </script>
          <!-- /TinyMCE -->




          <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='elm1' name='elm1' 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>
          " ; 

And the js is

      $(document).ready(function(){ 
          $('#'+divbox).load('../customer_rm/display_email_send.php', function() {
              // once loaded 

              cont = "email" + tr  ;
              $('#mailto').val( $('#'+cont).val()) 
              $("#send").click(function() {send_email(tr) }); 
              });