Millainthesky
New Coder
Hello everyone,
I try to create a vistual notice-board with javascript code.
So I use the funstion setTimeout to change the page every certain time, but my script it only works with local files such as images.jpeg
I state that I have recently been studying programming language so I am totally inexperienced, but I ask you if you think it is possible to alternate between an image and an online (interactive) Power BI dashboard every set of time.
I am inserting the test I did to alternate two colored pages (the files are saved in HTML).
Thanks for the help!!!
I try to create a vistual notice-board with javascript code.
So I use the funstion setTimeout to change the page every certain time, but my script it only works with local files such as images.jpeg
I state that I have recently been studying programming language so I am totally inexperienced, but I ask you if you think it is possible to alternate between an image and an online (interactive) Power BI dashboard every set of time.
I am inserting the test I did to alternate two colored pages (the files are saved in HTML).
Thanks for the help!!!
HTML:
PAGE 1
<!DOCTYPE html>
<html>
<body bgcolor="red">
<h1>Test 2</h1>
<h2>change in 5 seconds</h2>
<script>
const myTimeout = setTimeout(changePage, 5000);
function changePage() {
var newLocation = "test_1.html";
window.location = newLocation;
}
</script>
</body>
</html>
HTML:
PAGE 2
<!DOCTYPE html>
<html>
<body bgcolor="yellow">
<h1>Test 1</h1>
<h2>change in 5 seconds</h2>
<script>
const myTimeout = setTimeout(changePage, 5000);
function changePage() {
var newLocation = "test_2.html";
window.location = newLocation;
}
</script>
</body>
</html>
Last edited by a moderator: