When you call .load()
in that fashion without additional data you are really just calling a simplified version of .get()
. If you're trying to use the data returned from the post, you should be doing
$.ajax({
type: "POST",
url: "/mentorlist",
data: {'topic': topic},
success: function(dataString) {
$('#mentor_list').html(dataString);
console.log('**mentor_list div updated via ajax.**');
}
});