Am working on a grails application. I need to retrieve database data using ajax. I'm having trouble replacing content, it's unnecessarily refreshing the header. My structure is:
<div id="header">
<g:render template="/test/header"></g:render>
</div>
<div class="addrow">
table content from db
</div>
My code is:
success: function(response){
$(".addrow").html(response);
}
It's refreshing the header also, not just the data. I tried with these also but no luck:
$(".addrow").parent().html(response);
$(".addrow").replaceWith(response);
Now do I avoid refreshing the header?