$(document).ready(function(){
    $("#submitbut").mouseover(function(){
        // price
        //alert('hai');
    var trip = $("#tripno").val();
    if(trip== "")
    {
        $("#tripno").focus();
        $("#tripno").css("border","1px solid red");
        $("#tripno").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
        $("#submitbut").prop("disabled",true);
    }
    // 
    //alert('hai');
    var deliveryadd = $("#deliveryadd").val();
    if(deliveryadd == "")
    {
        $("#deliveryadd").focus();
        $("#deliveryadd").css("border","1px solid red");
        $("#deliveryadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
        $("#submitbut").prop("disabled",true);
    }
    // 
    //alert('hai');
    var qty = $("#netqtyadd").val();
    if(qty == "")
    {
        $("#netqtyadd").focus();
        $("#netqtyadd").css("border","1px solid red");
        $("#netqtyadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
        $("#submitbut").prop("disabled",true);
    }
    // 
    //alert('hai');
    var saletype = $("#salestypeadd").val();
    if(saletype == "0")
    {
        $("#salestypeadd").focus();
        $("#salestypeadd").css("border","1px solid red");
        $("#salestypeadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
        $("#submitbut").prop("disabled",true);
    }
    // 
    // customer
var customer = $("#customeradd").val();
if(customer == "0")
{
    $("#customeradd").focus();
    
    $("#submitbut").prop("disabled",true);
}
// customer
// vehicle
var vehicle= $("#vehicleno").val();
if(vehicle == "0")
{
    $("#vehicleno").focus();
    
    $("#submitbut").prop("disabled",true);
}
// vehicle
// product
var product= $("#productadd").val();
if(product == "0")
{
    $("#productadd").focus();
    
    $("#submitbut").prop("disabled",true);
}
// vehicle

});
// keyup function
$("#submitbut").keyup(function(){
    // price
    //alert('hai');
var trip = $("#tripno").val();
if(trip== "")
{
    $("#tripno").focus();
    $("#tripno").css("border","1px solid red");
    $("#tripno").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
    $("#submitbut").prop("disabled",true);
}
// 
//alert('hai');
var deliveryadd = $("#deliveryadd").val();
if(deliveryadd == "")
{
    $("#deliveryadd").focus();
    $("#deliveryadd").css("border","1px solid red");
    $("#deliveryadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
    $("#submitbut").prop("disabled",true);
}
// 
//alert('hai');
var qty = $("#netqtyadd").val();
if(qty == "")
{
    $("#netqtyadd").focus();
    $("#netqtyadd").css("border","1px solid red");
    $("#netqtyadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
    $("#submitbut").prop("disabled",true);
}
// 
//alert('hai');
var saletype = $("#salestypeadd").val();
if(saletype == "0")
{
    $("#salestypeadd").focus();
    $("#salestypeadd").css("border","1px solid red");
    $("#salestypeadd").css("box-shadow","2px 1px 3px 1px rgba(241, 70, 70, 0.979)");
    $("#submitbut").prop("disabled",true);
}
// 
// customer
var customer = $("#customeradd").val();
if(customer == "0")
{
$("#customeradd").focus();

$("#submitbut").prop("disabled",true);
}
// customer
// vehicle
var vehicle= $("#vehicleno").val();
if(vehicle == "0")
{
$("#vehicleno").focus();

$("#submitbut").prop("disabled",true);
}
// vehicle
// product
var product= $("#productadd").val();
if(product == "0")
{
$("#productadd").focus();

$("#submitbut").prop("disabled",true);
}
// vehicle

});



// keyup
// triprealse
$("#tripno").keyup(function(){
    $("#tripno").css("border","1px solid skyblue");
    $("#tripno").css("box-shadow","2px 1px 3px 1px skyblue");
    $("#submitbut").prop("disabled",false);
});
// triprelease
// deliveryrealse
$("#deliveryadd").keyup(function(){
    $("#deliveryadd").css("border","1px solid skyblue");
    $("#deliveryadd").css("box-shadow","2px 1px 3px 1px skyblue");
    $("#submitbut").prop("disabled",false);
});
// deliveryrelease
// triprealse
$("#netqtyadd").keyup(function(){
    $("#netqtyadd").css("border","1px solid skyblue");
    $("#netqtyadd").css("box-shadow","2px 1px 3px 1px skyblue");
    $("#submitbut").prop("disabled",false);
});
// triprelease
// cusrealse
$("#customeradd").on('change',function(){
    
    $("#submitbut").prop("disabled",false);
});
// cusrelease
// vehrealse
$("#vehicleno").on('change',function(){
    
    $("#submitbut").prop("disabled",false);
});
// vehrelease
// vehrealse
$("#productadd").on('change',function(){
    
    $("#submitbut").prop("disabled",false);
});
// vehrelease
// triprealse
$("#salestypeadd").on('change',function(){
    $("#salestypeadd").css("border","1px solid skyblue");
    $("#salestypeadd").css("box-shadow","2px 1px 3px 1px skyblue");
    $("#submitbut").prop("disabled",false);
});
// triprelease
});