Here, I am trying to update input type a attribute text only, if the obj.idPartnerOffice == json.idPartnerOffice
condition is true. How can I update project name only ?1つのテキストのみを設定する方法<a attribute list?
if (json.idPartnerProject == "0") {
json.idPartnerProject = Math.random();
hidJson.Form5.Projects.push(json);
$("#divbindProjectlist").append('<a href="#" id="anchorproject1" class="list-group-item projectList" >' + json.ProjectName + '<input type="hidden" name="hiddenproject1" class="hidprojectId" value="' + json.idPartnerProject + '" /></a>');
}
else {
$.each(hidJson.Form5.Projects, function (i, obj) {
if (obj.idPartnerProject == json.idPartnerProject) {
hidJson.Form5.Projects[i] = json;
$("#anchorproject1").html(json.ProjectName).append('<input type="hidden" name="hiddenproject1" class="hidprojectId" value="' + json.idPartnerProject + '" />');
}
});
}
Here is image for html view with list of projects,
今、すべての非表示フィールドの値が変更されます。どうすれば修正できますか?
問題は何ですか? – Satpal
最初の AbhiJA
obj変数またはjson変数を変更したいですか? – Keith