Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="content">
- <link rel="stylesheet" href="<?php echo base_url();?>jquery/jquery-ui.css" type="text/css" media="all" />
- <link rel="stylesheet" href="<?php echo base_url();?>jquery/css/smoothness/jquery-ui-1.8.20.custom.css" type="text/css" media="all" />
- <link rel="stylesheet" href="<?php echo base_url();?>jquery/ui.theme.css" type="text/css" media="all" />
- <script src="<?php echo base_url();?>jquery/jquery.min.js" type="text/javascript"></script>
- <script src="<?php echo base_url();?>jquery/jquery-ui.min.js" type="text/javascript"></script>
- <script src="<?php echo base_url();?>jquery/development-bundle/ui/jquery-ui-1.8.20.custom.js" type="text/javascript"></script>
- <script type='text/javascript'>
- $(function() {
- $( "#tgl_id" ).datepicker({
- defaultDate: "+1w",
- dateFormat: 'yy-mm-dd',
- changeMonth: true,
- numberOfMonths: 2,
- onSelect: function( selectedDate ) {
- $( "#tgl_id2" ).datepicker( "option", "minDate", selectedDate );
- }
- });
- $( "#tgl_id2" ).datepicker({
- defaultDate: "+1w",
- dateFormat: 'yy-mm-dd',
- changeMonth: true,
- numberOfMonths: 2,
- onSelect: function( selectedDate ) {
- $( "#tgl_id" ).datepicker( "option", "maxDate", selectedDate );
- }
- });
- });
- </script>
- <?php $tgl1 = array(
- 'name' => 'tgl_awal',
- 'id' => 'tgl_id',
- 'value' => '',
- 'size' => '10',
- 'readonly' => 'readonly'
- );
- $tgl2 = array(
- 'name' => 'tgl_akhir',
- 'id' => 'tgl_id2',
- 'value' => '',
- 'size' => '10',
- 'readonly' => 'readonly'
- ); ?>
- <?php
- echo validation_errors();
- echo $this->session->flashdata('msg'); ?>
- <?php echo form_open('insert/input'); ?>
- <div id="stream" >
- Stream : <?php
- echo form_dropdown("stream",$stream,"","id='stream_id'");
- ?><br>
- </div>
- <div id="materi">
- Materi :
- <?php
- echo form_dropdown("materi",array('Pilih materi'=>'Pilih stream Dahulu'),'','disabled');
- ?><br>
- </div>
- LC Area :<?php
- echo form_dropdown("lc",$lc,"","id='lc_id'");
- ?><br>
- Instruktur :<?php
- echo form_dropdown("inst",$inst,"","id='inst_id'");
- ?><br>
- Ubis :<?php
- echo form_dropdown("ubis",$ubis,"","id='ubis_id'");
- ?><br>
- Angkatan : <?php echo form_input("ang","","size='1'"); ?>
- Tgl Awal :<?php echo form_input($tgl1); ?>
- Tgl Akhir :<?php echo form_input($tgl2); ?><br>
- Anggaran :<?php echo form_input("angr"); ?>
- Peserta : <?php echo form_input("pst","","size='5'");?><br>
- <?php echo form_submit("Simpan","simpan"); ?>
- <?php echo form_close(); ?>
- <script type="text/javascript">
- $("#stream_id").change(function(){
- var stream_id = {stream_id:$("#stream_id").val()};
- $.ajax({
- type: "POST",
- url : "<?php echo site_url('combo/select_materi')?>",
- data: stream_id,
- success: function(msg){
- $('#materi').html(msg);
- }
- });
- });
- </script>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment