[Solved] Hide an element and show another if page is taking too long to load [closed]

It’s not something I’d usually recommend but here’s a pretty hacky solution. const video = document.querySelector(“#video-element-id”); let tooSlow = false; let timeout = setTimeout(() => { tooSlow = true; …logic to change header clearTimeout(timeout); }, 1000); video.addEventListener(‘loadeddata’, () => { console.log(tooSlow ? ‘too slow’ : ‘loaded’); clearTimeout(timeout); }); * EDIT – or you could do … Read more

[Solved] Java Timer : I want to fade in and out for my picture but there are some error [closed]

Screen size you cat get without using JFrame’s instance: screen = Toolkit.getDefaultToolkit().getScreenSize(); Also after creating JFrame, add a component listener to update width, height on any resize: JFrame frame = new JFrame(“fade frame”); frame.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { width = image.getWidth(frame); height = image.getHeight(frame); } }); solved Java Timer : I … Read more

[Solved] linking timers to variables [closed]

Well as you have not shown us any code, let me assume that you at least have a class to encapsulate order. public class Order { public int OrderNumber{get;set;} ///other properties } Now if you add following two properties and a method, your problem is resolved. public class Order { public int OrderNumber{get;set;} //other properties … Read more

[Solved] document.write is killing page

as everybody suggested. document.write will clear everything from the DOM. the best way to write this would be to have a DIV in your HTML and set that div in your javascript code. here’s what your HTML should look like <div id=”page_message” style=”display: none;”></div> <div class=”countdown_out”> <div id=”countdown_title”>NFL Season Opener Countdown</div> <div class=”countdown_position”> <div class=”countdownBox”> … Read more