Hello I am trying to run this code but every time I open my webpage it doesn't load and I don't get the text I echo with php in the file "money.php". But if I open the console in my browser and run the code it does load. Does anyone know how I could fix this?
<script type="text/javascript">
$('[data-update]').each(function() {
var self = $(this);
var target = self.data('update');
var refreshId = setInterval(function() { self.load(target); }, self.data('refresh-interval'));
});
</script>
<div data-update="money.php" data-refresh-interval="500">
The website owner needs to renew the certificate before the expiry date. This keeps their website from getting flagged by browsers. When visiting the website, the browser compares this certificate against your system date. If your system date-time is outside the expiry period, the browser stops the page from loading.
You’re not giving very much information to go on, but the first thing to do is ensure that your JavaScript is actually loading, and that it is not executing before your document is completely loaded. The easiest way to do this is by including the script tag at the end of the body tag. Next, check the JavaScript console.
Method 1: Using onload method: The body of a webpage contains the actual content that is to be displayed. The onload event occurs whenever the element has finished loading. This can be used with the body element to execute a script after the webpage has completely loaded.
1 Delete temporary files – Press Win+ R key together on your keyboard, type %temp% in “run” dialog box and hit OK, it will take you to the temporary files, ... 2 Delete history, cache, and cookies from browsers. 3 Reset your browsers to their default settings. ... 4 Check the Hosts file in Windows if a particular website is not working.
Use This
<script type="text/javascript">
$(function() {
$('[data-update]').each(function () {
var self = $(this);
var target = self.data('update');
var refreshId = setInterval(function () {
self.load(target);
}, self.data('refresh-interval'));
});
});
</script>
OR This
<script type="text/javascript">
$(document).ready(function() {
$('[data-update]').each(function () {
var self = $(this);
var target = self.data('update');
var refreshId = setInterval(function () {
self.load(target);
}, self.data('refresh-interval'));
});
});
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With