我有一個包含項目列表的默認頁面。當我點擊那些我需要動態地追加數據頁面B到股利和應用重定向到頁面B.無法將數據追加到Div並重定向頁面
項目我網頁B '
加入這個div On Click事件我做以下動作在.js文件:
'$(document).on('click', '#selectConcept', function (node) {
var ncid = this.textContent.slice(6,25);
$.ajax({
dataType: "json",
url: "http://txv-trmindexer01:8080/CommonTerminologyLeopardSearch/rest/getConceptByNcid/" + ncid,
error: function() {
alert("ERROR");
},
success: function (data) {
window.location.href = 'getfacets.html';
for (var result = 0; result < finalSearchResults.length; result++) {
if (finalSearchResults[result].ncid == ncid) {
$("#selectedConceptitem").empty();
var selectedconcept = "<p>" + "ncid: " + finalSearchResults[result].ncid + "," + "cid: " + finalSearchResults[result].cid + "</p>";
$(selectedconcept).appendTo("#selectedConceptitem");
}
}
} });
});'
我能夠重定向頁面,但沒有附加到事業部。
誰能幫助我走出這個..