I'm looking to enhance the user experience on my dashboard by allowing users to set their preferred default tab view upon logging in. Using an AJAX call to retrieve the value from the database in MVC, I am working on the JS/Razor side of things to make it functional. Any insights or suggestions on how to tackle this issue would be highly appreciated.
Code
//Load Account Preferences
function loadAccountPreferences() {
$.ajax({
type: "GET",
dataType: 'json',
url: '/JsonUserSettings/GetUserSettings',
success: function (result) {
loadDefaultTab(result);
},
error: function(error) {
alert(error);
}
});
}
loadDefaultTab = function (tabId) {
$("#dashboardTabs a: tabId").tab('show');
}