示例#1
0
if ($mode == 'view') {
    echo form_open('periode/update', 'id=\'myform\' name=\'myform\' class=\'form-horizontal\' role=form');
    $disabled = 'disable';
} else {
    $disabled = '';
    echo form_open('periode/add', 'id=myform name=myform  class=form-horizontal  role=form');
}
?>
<table class='table2' width='100%'>
<? 
	echo my_input_tr("Periode Id",'period',$period);
	echo my_input_tr("Periode Month",'month_name',$month_name);
	echo my_input_tr("Year",'year_id',$year_id);
	echo my_input_tr("Sequence",'sequence',$sequence);
	echo my_input_tr("Start Dtae",'startdate',$startdate);
	echo my_input_tr("End Date",'enddate',$enddate);
	echo "<tr><td>Sudah Tutup Buku ?</td>
		<td colspan='2'>".form_radio('closed','No',$closed=='0'||$closed=='')
		." &nbsp No ".form_radio('closed','Yes',!($closed=='0'||$closed==''))
		." &nbsp Yes </td></tr>";
	echo form_close();
?>
<script type="text/javascript">
    function save_periode(){
        if($('#period').val()===''){alert('Isi dulu kode periode !');return false;};
        if($('#year_id').val()===''){alert('Isi dulu tahun !');return false;};
        $('#myform').submit();
    }
</script>  

 	<script type="text/javascript">
示例#2
0
<div id="dlgAsm" class="easyui-dialog"  buttons="#tbAsm"
	style="width:400px;height:300px;padding:5px 5px" closed="true" >
	<form id="frmAsm" name="frmAsm" method="POST">
	<table class="table2" width="100%">
		<?
		$search=link_button('','frmAsm_CariBarang()','search');
		my_input_tr("Kode Baramg","assembly_item_number","",$search);
		my_input_tr("Nama Baramg","description");
		my_input_tr("Quantity","quantity");
		my_input_tr("Cost","default_cost");
		my_input_tr("Comment","comment");
		?>
	</table>
	</form>
</div>
<div id='tbAsm'>
	<? 
	echo link_button("Save","dlgAsm_Save()","save");
	echo link_button("Close","dlgAsm_Close()","cancel");
	?>
</div>
 

<script language="JavaScript">
	function frmAsm_CariBarang(){
		var fields=[[
				{field:'item_number',title:'Item Number',width:100},
				{field:'description',title:'Name',width:100},
				{field:'cost',title:'Cost',width:100,align:'right'}
			]];
		var url='<?php