2014-09-27 82 views
0

後無法正確顯示我加載一個PHP頁面到spefific格,使用此代碼選擇選項不.load阿賈克斯

function peopleEdit(id, currid) { 


     $("#people_edit").load("people_edit.php?id="+currid); 


return false; 
} 

有2個問題,雖然。

  1. 窗體顯示,選項框中有選項值,並且該選項不起作用。

  2. tinymce框顯示,但數據開箱即用。

形式進行了測試和前阿賈克斯.load

這裏的HTML表單工作正常。

<form action="people.php" enctype="multipart/form-data" name="pelatesForm" id="pelatesForm" method="post"> 

    <table width="90%" border="0" cellspacing="0" cellpadding="6"> 

      <tr> 
     <td width="20%" align="right">Τύπος</td> 
     <td width="80%"><label> 
      <select name="pelates_type_det" id="pelates_type_det" /> 
      <option value="<?php echo $pelates_det_type ?>"><?php echo $pelates_det_type ?></option> 
      <option value="Πελάτης">Πελάτης</option> 
      <option value="Προμηθευτής">Προμηθευτής</option> 
      </select> 
     </label></td> 
     </tr> 
       <tr> 
     <td width="20%" align="right">Όνομα</td> 
     <td width="80%"><label> 
      <input name="pelates_first_name_det" type="text" id="pelates_first_name_det" size="64" value="<?php echo $pelates_det_first_name ?>" /> 
     </label></td> 
     </tr> 
        <tr> 
     <td width="20%" align="right">Επίθετο</td> 
     <td width="80%"><label> 
      <input name="pelates_last_name" type="text" id="pelates_last_name" size="64" value="<?php echo $pelates_det_last_name ?>" /> 
     </label></td> 
     </tr> 

      <tr> 
     <td width="20%" align="right">Τηλέφωνο - Σταθερό</td> 
     <td width="80%"><label> 
      <input name="pelates_phone" type="text" id="pelates_phone" size="64" value="<?php echo $pelates_det_phone ?>" /> 
     </label></td> 
     </tr> 
       <tr> 
     <td width="20%" align="right">Τηλέφωνο - Κινητό</td> 
     <td width="80%"><label> 
      <input name="pelates_cell" type="text" id="pelates_cell" size="64" value="<?php echo $pelates_det_cell ?>" /> 
     </label></td> 
     </tr> 

         <tr> 
     <td width="20%" align="right">Email</td> 
     <td width="80%"><label> 
      <input name="pelates_email" type="text" id="pelates_email" size="64" value="<?php echo $pelates_det_email ?>" /> 
     </label></td> 
     </tr> 
          <tr> 
     <td width="20%" align="right">Όνομα εταιρείας - Ιδιώτης</td> 
     <td width="80%"><label> 
     <input name="pelates_company" id="pelates_company" size="64" value="<?php echo $pelates_det_company ?>" /> 
     </label> 
     </td> 
     </tr> 
            <tr> 
     <td width="20%" align="right">ΑΦΜ</td> 
     <td width="80%"><label> 
      <input name="pelates_afm" type="text" id="pelates_afm" size="64" value="<?php echo $pelates_det_afm ?>" /> 
     </label></td> 
     </tr> 
     <tr> 
     <td width="20%" align="right">ΔΟΥ</td> 
     <td width="80%"><label> 
      <input name="pelates_doy" type="text" id="pelates_doy" size="64" value="<?php echo $pelates_det_doy ?>" /> 
     </label></td> 
     </tr> 
          <tr> 
     <td width="20%" align="right">Διεύθυνση</td> 
     <td width="80%"><label> 
      <input name="pelates_address" type="text" id="pelates_address" size="64" value="<?php echo $pelates_det_address ?>" /> 
     </label></td> 
     </tr> 
          <tr> 
     <td width="20%" align="right">Ταχυδρομικός κώδικας</td> 
     <td width="80%"><label> 
      <input name="pelates_tk" type="text" id="pelates_tk" size="64" value="<?php echo $pelates_det_tk ?>" /> 
     </label></td> 
     </tr> 
            <tr> 
     <td width="20%" align="right">Περιοχή</td> 
     <td width="80%"><label> 
      <input name="pelates_area" type="text" id="pelates_area" size="64" value="<?php echo $pelates_det_area ?>" /> 
     </label></td> 
     </tr> 
      <tr> 
     <td width="20%" align="right">Σχόλια</td> 
     <td width="80%"> 
      <textarea name="pelates_comments_det" type="text" class="tinymce" id="pelates_comments_det" size="64" /><?php echo $pelates_det_comments ?></textarea> 
     </td> 
     </tr> 

      <tr> 

     <td>&nbsp;</td> 
     <td><label> 
     <input name="thisID" type="hidden" value="<?php echo $targetID ?>" /> 
      <input type="submit" name="submitpel" id="submitpel" value="Υποβολή" /> 
      <input type="button" value="Άκυρο" onclick="return epistrofi('people_detailed','<?php echo $targetID ?>');" /> 
     </label> 
     </td> 
     </tr> 
    </table> 
</form> 

爲什麼會出現這種情況的任何想法?

回答

1

您關閉select

<select name="pelates_type_det" id="pelates_type_det" /> 

更改爲:

<select name="pelates_type_det" id="pelates_type_det"> 
+0

謝謝!做到了! – 2014-09-27 08:21:32