<input type="hidden" name="id" value="<{$row.id}>"/>
<table class="etable">
	<tr>
		<td width="70">名称： </td>
		<td><input type="text" name="name" size="30" id="name" value="<{$row.name}>"/></td>
	</tr>
</table>
<script type="text/javascript"> 
function ajax_submit()
{
	name = $("#name").val(); 		
	if(name == ''){ 
		$.alert('分组名称不能为空！');	return false;  
	}
	$.post(SELLER+'album/type_save', {<{if $row.id}>id:<{$row.id}>,<{/if}> <{if $smarty.get.pid}>pid:<{$smarty.get.pid}>,<{/if}>  name:name}, function(result){ 
		var data = jQuery.parseJSON(result);  
		if(data.error == '0'){ 
			ajax_close();
			location.reload();
		}else{
			$.alert(data.msg);
		}
	}); 
} 
</script>