/********************************** Validation *******************************************************/
function roll_size_validation()
{
    var roll_size_name = document.getElementById("roll_size_name").value;
	if(roll_size_name=='')
	{
		document.getElementById("roll_size_name_validation_div").innerHTML="* This field is Required.";
		document.getElementById("roll_size_name").focus();
		return false;
	}
}

function roll_size_clear_validation(str)
{
	if(str!='')
	{
		document.getElementById("roll_size_name_validation_div").innerHTML="";
	}
}

/********************************** Mainlist Add *******************************************************/
function roll_size_mainlist_add(roll_size_name,roll_size_remarks,edit_id,action)
{

if((roll_size_name!=''))
 {
  jQuery.ajax({
		type: "POST",
		url: "roll_size_entry_db.php",
		data: "roll_size_name="+roll_size_name+"&roll_size_remarks="+roll_size_remarks+"&edit_id="+edit_id+"&action="+action,
		success: function(msg){jQuery("#roll_size_list_div").html(msg);	
		alert(msg);
		window.close();
		window.opener.location.reload(true);
		
 }
		});
 }
else
{
    roll_size_validation();
}
}

/********************************** Mainlist Delete *******************************************************/
function roll_size_delete_row(id)
{
	if(confirm('Are You Sure! You Want To Delete?'))
	{
		jQuery.ajax({
		type: "POST",
		url: "roll_size_creation/roll_size_entry_db.php",
		data: "id="+id+"&action=delete_roll_size",
		success: function(msg){jQuery("#roll_size_list_div").html(msg);
	}
	});
    }
}


