javascript - location.reload to a specific Tab using ASP.net MVC Core -


i have page loads multiple tables separated tab using bootstrap.

in third tab called patient tab, have action being done inside modal.

an ajax call in view call action in controller, when logic returned view, call alert box , load latest result set in table, put location.reload() function, however, page returns or load in first tab , not in 3rd action.

can specify or force tab loaded?

here snippet of ajax call in view, since quite long

 }).promise().done(function () {             $.ajax({                 type: 'post',                 url: '/patient/saveweight',                 datatype: 'json',                 contenttype: 'application/json',                 data: json.stringify(add_upd_obj_arr),                 datatype: "json",                 traditional: true,                 success: function (result) {                     if (result.errmsg == '' || result.errmsg == "") {                         bootbox.alert({                             size: "small",                             title: "confirmation!",                             message: "successfully updated.",                             callback: function () {                                 $('#modalvitalsign').modal('hide');                                 location.reload();                             }                         });                     } else {                         bootbox.alert(result.errmsg);                     }                 },                 error: function () {                     bootbox.alert({                         size: "small",                         title: "error!",                         message: "there error while loading data."                     });                 }             });         }); 

i tried this, not refresh

 window.location.hash = tab_treatment_info; //id of third tab 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -