dmjio
9/18/2012 - 2:34 PM

productexists

productexists

var productExists = function() {

            var prod = $("#product_ok").css('display');
            var brand = $("#brand_ok").css('display');

            var btn = $("#btnSubmit");

            if (prod != 'none' && brand != 'none') {
                btn.attr('disabled', 'disabled');
                btn.text("This product already exists");
            } else {
                btn.removeAttr("disabled");
                btn.text("Submit request");
            }
        };