<div id="header">
Content that will always stay the same and should not refresh.
</div>
<div id="alert" class="alert" role="alert">
Â
</div>
<div id="results">
    Â
</div>
<script>
$(function() {
//HIDE ALERT ON PAGE LOAD
$('alert').hide();
$.ajax({
 method: "POST",
 url: "processing/page",
 data: { clientID: "1233"}
})
 .done(function( data) {
   //PARSE DATA {.....}
   if(data.foo === "1"){
     //SUCCESS
    //UPDATE ALERT
      $('#alert').html('<p>Your data was saved</p>');
      $('#alert').addClass('alert-success');
      $('#alert').show();
     //UPDATE #RESULTS
       $('#results').html(data.bar);
    } else {
    //FAIL
    //UPDATE ALERT
      $('#alert').html('<p>There was an error</p>');
      $('#alert').addClass('alert-danger');
      $('#alert').show();
     //UPDATE #RESULTS
       $('#results').html('<p>There was ann error</p>');
    }
  Â
 });
 });
</script>
.navbar navbar-inverse navbar-fixed-top{
  display:none;
}
>> You can check the actual control's rendered client id/class to hide it via jquery- Hide() method in jquery: https://api.jquery.com/hide/
Please share your page URL/related source code if you need any help to find find the toolbard and nav bar in from your rendered html code.
b) Advise if there is a better way to refresh the data. I believe this is the tried and test way and all use it. I.e. refresh a div content WITHOUT reloading the page.. That is the aim.
>> You can use AJAX if you want to refresh the content without reloading the entire page.
Sample:
https://www.studentstutorial.com/ajax/ajax_without_refresh.php
If you just want to remove everything in your JS template's toolbar.index.php and replace with following code:
Open in new window
More information:
https://www.techfry.com/joomla/joomla-defined-jexec-or-dieÂ