Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/admin/company/division.tpl.html
<div class="box box-75 altbox">
    <div class="boxin">
        <div class="header">
            <h3>Division</h3>
        </div>
        <div class="content">
        	<form action="" enctype="multipart/form-data" id="division" name="division" method="post">
                <table align="center" border="2">
                    <tr>
                    <td align="right">Division name</td>
                    <td><input name="divsion[divsion_name]" type="text" id="divsion_name"/></td>
                    <td align="right"><input name="add" id="add" type="button" value="Add" onclick="division_manupulation();"></td>
                  </tr>
      				
                </table>
                <input type="hidden" name="id_department" id="id_department" value="" />
                <input type="hidden" name="id_division" id="id_division" value="" />
                
			</form>
		</div>
	</div>
</div>
<div id="company_deptlisting">{include file=admin/company/departmentlisting}</div>
{literal}
<script type="text/javascript">
	function division_manupulation(){
		//alert($('#id_department').val());
		var url1=$('#division').serialize();
		var url2;
		if($('#id_division').val()){
		
		//alert("update");
		var url2="##LBL_ADMIN_SITE_URL##company/updatedivision/ce-0-?";
		
		}else{
		//alert("insert");
		var url2="##LBL_ADMIN_SITE_URL##company/insertdivision/ce-0-?";
		}
		//var url1=$('#department').serialize(); //searchform  id the form name
		//alert(url1);
		//var url2="##LBL_ADMIN_SITE_URL##company/insertdepartment/ce-0-?";
		var url=url2+url1;
		//alert(res);
		$.post(url,{},function(res){
		$('#division_list').html(res);
	});
	return false;
	}
	
</script>
{/literal}
Return current item: SimpleHRM