I am using AJAX and sending post.
in the response 200 Ok I can see that I am able to see the div I want. but that data is replaced but is getting appended.
can you please guide me how t debug these type of issues and fix them.
request.done(function(response) {
alert('Loaded.');
$('#data1').html(response);
});
I am able to see that “Loaded” alert is coming . so it is done.
on firebug I can see the 200 OK with the data.
1) #data1 is a Javascript template.
so, I am trying to update that template which will trigger the data in the tables and all to be modified.
data is :
<divid='data1'>
<script> ...................</script>
</div>
so I see that data getting updated . but the old data is not getting removed.
I tried : replaceWith
with that also , it is only appending the page and not replacing it
=
This Div is a Javascript template.
so this div as:
<div id='data1'><script> .....</script></div>
- on my browser data is always getting updated and not replaced.
- one more basic question , if I get response it is appending the data . when I see the viewsource, even the display shows example 20 entries . it shows only 10 entries which are initial , wit Ajax when a response is received will the source does not get modified?
is not valid HTML. It should be:
You’re missing the
id=part of the attribute.