aries_

form_input

Aug 7th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.36 KB | None | 0 0
  1. <div id="content">
  2.  
  3.      <link rel="stylesheet" href="<?php echo base_url();?>jquery/jquery-ui.css" type="text/css" media="all" />
  4.   <link rel="stylesheet" href="<?php echo base_url();?>jquery/css/smoothness/jquery-ui-1.8.20.custom.css" type="text/css" media="all" />
  5.   <link rel="stylesheet" href="<?php echo base_url();?>jquery/ui.theme.css" type="text/css" media="all" />
  6.         <script src="<?php echo base_url();?>jquery/jquery.min.js" type="text/javascript"></script>
  7.       <script src="<?php echo base_url();?>jquery/jquery-ui.min.js" type="text/javascript"></script>
  8.        <script src="<?php echo base_url();?>jquery/development-bundle/ui/jquery-ui-1.8.20.custom.js" type="text/javascript"></script>
  9.      <script type='text/javascript'>
  10.     $(function() {
  11.         $( "#tgl_id" ).datepicker({
  12.             defaultDate: "+1w",
  13.                         dateFormat: 'yy-mm-dd',
  14.             changeMonth: true,
  15.             numberOfMonths: 2,
  16.             onSelect: function( selectedDate ) {
  17.                 $( "#tgl_id2" ).datepicker( "option", "minDate", selectedDate );
  18.             }
  19.         });
  20.         $( "#tgl_id2" ).datepicker({
  21.             defaultDate: "+1w",
  22.                         dateFormat: 'yy-mm-dd',
  23.             changeMonth: true,
  24.             numberOfMonths: 2,
  25.             onSelect: function( selectedDate ) {
  26.                 $( "#tgl_id" ).datepicker( "option", "maxDate", selectedDate );
  27.             }
  28.         });
  29.     });
  30.     </script>
  31.    
  32.         <?php  $tgl1 = array(
  33.               'name'        => 'tgl_awal',
  34.               'id'          => 'tgl_id',
  35.               'value'       => '',
  36.               'size'        => '10',
  37.               'readonly'    => 'readonly'
  38.             );
  39.         $tgl2 = array(
  40.               'name'        => 'tgl_akhir',
  41.               'id'          => 'tgl_id2',
  42.               'value'       => '',
  43.               'size'        => '10',
  44.               'readonly'    => 'readonly'
  45.             ); ?>
  46.    <?php
  47.    echo validation_errors();
  48.    echo $this->session->flashdata('msg'); ?>
  49.     <?php echo form_open('insert/input'); ?>
  50. <div id="stream" >
  51.     Stream      : <?php
  52.         echo form_dropdown("stream",$stream,"","id='stream_id'");
  53.     ?><br>
  54. </div>
  55.    <div id="materi">
  56.     Materi      :
  57.  <?php
  58.         echo form_dropdown("materi",array('Pilih materi'=>'Pilih stream Dahulu'),'','disabled');
  59.     ?><br>
  60.    </div>
  61.     LC Area     :<?php
  62.         echo form_dropdown("lc",$lc,"","id='lc_id'");
  63.     ?><br>
  64.   Instruktur    :<?php
  65.         echo form_dropdown("inst",$inst,"","id='inst_id'");
  66.     ?><br>
  67.          Ubis :<?php
  68.         echo form_dropdown("ubis",$ubis,"","id='ubis_id'");
  69.     ?><br>
  70.     Angkatan    : <?php echo form_input("ang","","size='1'"); ?>
  71.     Tgl Awal :<?php echo form_input($tgl1); ?>
  72.     Tgl Akhir :<?php echo form_input($tgl2); ?><br>
  73.     Anggaran :<?php echo form_input("angr"); ?>
  74.     Peserta : <?php echo form_input("pst","","size='5'");?><br>
  75.     <?php echo form_submit("Simpan","simpan"); ?>
  76.  <?php echo form_close(); ?>
  77.     <script type="text/javascript">
  78.             $("#stream_id").change(function(){
  79.                 var stream_id = {stream_id:$("#stream_id").val()};
  80.                 $.ajax({
  81.                         type: "POST",
  82.                         url : "<?php echo site_url('combo/select_materi')?>",
  83.                         data: stream_id,
  84.                         success: function(msg){
  85.                             $('#materi').html(msg);
  86.                         }
  87.                     });
  88.         });
  89.        </script>
  90. </div>
Advertisement
Add Comment
Please, Sign In to add comment