jquery - AJAX div not working properly -


am working on grails application. need retrieve database data using ajax. i'm having trouble replacing content, it's unnecessarily refreshing header. structure is:

<div id="header">  <g:render template="/test/header"></g:render> </div> <div class="addrow">  table content db </div> 

my code is:

success: function(response){  $(".addrow").html(response);  } 

it's refreshing header also, not data. tried these no luck:

 $(".addrow").parent().html(response);  $(".addrow").replacewith(response); 

now avoid refreshing header?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -