I have the following file named navbar.php. and I wanted it to be refreshed with a time delay so I used the js function bellow and it works fine. problem is when page refreshed it doesnt go to the actual path, instead it adds the name of the controller and function to the source path and return 404 , help pls.
<div class="group" id="mydiv">
<!--some content -->
</div>
<script type="text/javascript">
$(document).ready(function () {
setInterval(function() {
$.get("application/views/templates/navbar.php", function (result) {
$('#mydiv').html(result);
});
}, 15000);
});
Chrome console log says : GET http://localhost/HDMSV2/dashbord/Dashbord_Controller/application/views/templetes/navbar.php 404 (Not Found)