How to activate tab on which validation error is occuring
How to activate tab on which validation error is occuring
on page submit call below code in javascript
var validator = $("form#BrowseAccountEdit").kendoValidator({
validate: function () {
var tabId = $(".k-invalid:first").attr("data-tabid");
var tabLiId = $(".k-invalid:first").attr("data-tabliid");
if (tabId != null && tabLiId != null) {
activateValidTab(tabId, tabLiId);
}
//alert(tabId);
error = true;
}
}).data("kendoValidator");
function that will activate tab
function activateValidTab(tabId, tabLiId) {
deActivateTab();
debugger;
$("#" + tabId).addClass('active in');
$("#" + tabLiId).addClass('active');
}
function that will de-activate tab
function deActivateTab() {
$("#tabsettings").removeClass("active");
$("#tabschedule").removeClass("active");
$("#box_RSSettings").removeClass('active in');
$("#box_RSCelender").removeClass('active in');
}
Share This with your friend by choosing any social account