7
Answers

How to Reload Div Content after ajax success

Mohit Kala

Mohit Kala

7y
206
1
On Dropdown Change I am Assigning Check box values first time it will display values but second time it will display both dropdown values 
Answers (7)
1
Altaf Ansari

Altaf Ansari

NA 1.4k 27.4k 7y
First Clear The Old Value then set new value :
 
  1. $("#TreeViewDiv").load(" #TreeViewDiv");  
  2. $.each(data.roleList, function (index, value) {  
  3. $(".access[data-id=" + value + "]").attr("checked"true);  
  4. });  
  5. $("#IsNew").val(''); // Setting blank value  
  6. $("#IsNew").val(data.IsNew); 
 
0
El Mahdi Archane

El Mahdi Archane

NA 5.9k 743.7k 7y
Hi Mohit,
 
Please, could you share with us the code snippet to understand what do you want exaclty ? 
0
Mohit Kala

Mohit Kala

NA 132 2.2k 7y
Not Working
0
Mohit Kala

Mohit Kala

NA 132 2.2k 7y
$("#TreeViewDiv").load(" #TreeViewDiv");//    When Dropdown change it will display checked checkbox and immediately uncheck
 
$.each(data.roleList, function (index, value) {
$(".access[data-id=" + value + "]").attr("checked", true);
});
$("#IsNew").val(data.IsNew);
0
Altaf Ansari

Altaf Ansari

NA 1.4k 27.4k 7y
Please share the Code to better understand..
0
Mohit Kala

Mohit Kala

NA 132 2.2k 7y
not matching with my condition
0
Altaf Ansari

Altaf Ansari

NA 1.4k 27.4k 7y
Try This :
  1. if (data.success){  
  2.    $("#divid").load(" #divid");  
  3.     }