+ 2

5sec wait or something

Guys I really need ya help Im making a project and I'd like to ask:how to make a page stay 5secs and load another html page.For example:http://dota2.net/ this website checks the browser if its valid it proceeds to forum.In my case it will just be inscription (Welcome) and waits 5 secs and loads my forum.And can it be done without js?

9th Dec 2017, 4:19 PM
yEra🇿
yEra🇿 - avatar
10 Respostas
0
If you want it cut down to a short example, I made one here to see what I could do. https://code.sololearn.com/WI8aU88AvaIF/?ref=app
9th Dec 2017, 5:22 PM
John Wells
John Wells - avatar
+ 1
thank u mate
9th Dec 2017, 5:07 PM
yEra🇿
yEra🇿 - avatar
+ 1
thanks a lot
9th Dec 2017, 6:04 PM
yEra🇿
yEra🇿 - avatar
0
I made a game that has a loading screen that does the same thing you want. feel free to copy that part of my code and use it as you need. https://code.sololearn.com/WFseja10kYEQ/?ref=app
9th Dec 2017, 4:56 PM
Nope
Nope - avatar
0
if you need me to explain anything just let me know
9th Dec 2017, 4:56 PM
Nope
Nope - avatar
0
u mean your loading ?Ok.How to make it stay a bit longer(+3 seconds).Because your loading is too fast
9th Dec 2017, 5:01 PM
yEra🇿
yEra🇿 - avatar
0
Short answer is JS is the only way. HTML can't make decisions. CSS is only for styles.
9th Dec 2017, 5:02 PM
John Wells
John Wells - avatar
- 1
look in my javascript. find navigation functions. inside there you'll see setTimeout.... setTimeout(function() { load.style.display = "none"; }, 2000);//Time in ms, 1000ms = 1s the time is in milliseconds so if you want it to be 5 seconds change it from 2000 to 5000
9th Dec 2017, 5:05 PM
Nope
Nope - avatar
- 1
it's in the very first function
9th Dec 2017, 5:06 PM
Nope
Nope - avatar
- 1
you're welcome. if you need more clarification let me know and I'll make a specific code explaining how it works
9th Dec 2017, 5:08 PM
Nope
Nope - avatar