Viewing file:      v_defineCurStructure.php (1.69 KB)      -rwxr-xr-x Select action/file-type:    (+) |   (+) |   (+) | Code (+) | Session (+) |   (+) | SDB (+) |   (+) |   (+) |   (+) |   (+) |   (+) |
 
<!-- กำหนดโครงสร้างหลักสูตร --> <!--<script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>--> <script> $(document).ready(function(){     if ('<?php echo $id; ?>' != ''){         changeCur('<?php echo $id; ?>','<?php echo $id; ?>');     }
  });
  function changeCur(id,seed){
      var url = "<?=site_url()."/".$this->config->item('rg_folder')?>"+"curpbri/cur_s_selectCur/"+id+"/"+seed;
      $.ajax({         url: url,         global: false,         type: "GET",         //      data: ({id : this.getAttribute('id')}),         //      dataType: "html",         async:false,         success: function(data)          {   //alert("success"+data);              $('#crs').html(data);         },         error: function(xhr,state,exception)          { //alert("error");              alert(state+', xhr.status = '+xhr.status);         }     }); } </script>
  เลือกหลักสูตรที่ใช้งานอยู่ 
  <br> <?php     if(isset($rs_cur)){         //$select = array('22');         $attributes = array('name' => 'curform');
          echo form_open('', $attributes);         //foreach($rs_cur->result() as $row){         //    $cur[$row->curId] = $row->curName;         //    $js = 'onChange="changeCur();"';         //}                  echo form_dropdown('cur', $rs_cur, $id, "onChange='changeCur(this.value,".mt_rand().")' id='cur' ");         echo form_close();     } ?> <?php         $attributes = array('id' => 'cd_form', 'name'=>'cd_form');         echo form_open('#', $attributes);     ?> <table width='100%' border='0'> <tr>     <td><div id='crs'></div></td> </tr> </table> <?php echo form_close(); ?>
  |