I have a web page that should insert new DB records and show them to the user.
What I want is that when I add a person, s(he) must see the added row. I have the code below:
function AddData(par){
var artistName = $("input[name='"+par+"']").attr('id') + '-'+$("input[name='"+par+"']").val();
$.post('/json/management/AddDataAjax2',
{
"artistName": artistName
},
function(response){
console.log(response);
if(response =='ok'){
alert("Başarıyla eklendi");
}
else{
alert("Sanatçı bulunamadı, yönlendiriliyorsunuz");
window.location.replace("http://www.sinemalar.com/management/artistAddEditRemove/");
}
});
}

The tabs are all divs. I gave each tab an ID and added a div refresh after inserting the record. However, it renders original page that I loaded. What’s the solution, any suggestion?
Just create a div where you want the data to be shown, something like this:
And then edit your jQuery to this: