67638/how-to-set-outerhtml-with-jquery
I have a UserControl. Ex:
<div id="divItem"> some html </div>
The ajax request return new html of this UC from server. Ex:
<div id="divItem"> new html </div>
I want to replace the old html by the new one. How could I do that?
hello @kartik,
This is innterHTML because it's inside the div called divItem. It also looks like you want to replace the existing text (?)
If your returned new html is in a variable called results, you do this:
$('#divItem').html(results);
Thank You!!
Hello @kartik, Sending the data in your scenario,I ...READ MORE
Hello @kartik, Basically, ajax request as well as ...READ MORE
Hello @kartik, Your syntax is incorrect, you should ...READ MORE
Hello @kartik, With hidden field you need to ...READ MORE
Let us consider the below block: <div ng-controller="emp"> ...READ MORE
Data binding is synchronization of data between the ...READ MORE
Hii @kartik, If you want to know php ...READ MORE
Hey, In the HTML form, we add ...READ MORE
Hello @kartik, Use: $(".myCheckbox").attr('checked', true); // Deprecated $(".myCheckbox").prop('checked', true); And if ...READ MORE
Hello @kartik, To solve the problem with ASP:Button ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.