i have a simple javascript function which runs the meta_data.php file every second. The meta_data.php file contains a simple database query. If the return of that database query is a specific value i want to stop the execution of the meta_data.php file. So my plan is to simply clear the Interval of the function check_data in the meta_data.php file.
Is it possible to set the Interval of the function "check_data" from the meta_data.php file? If yes, how can i do this?
<script>
$(document).ready(function {
setInterval(function check_data () {
$('#p_data_info').load('https://demo/includes/meta_data.php')
}, 1000);
});
Thanks for your help and time, Dave