Hello DaniWeb members, I've just joined up and I would like to have one of my problems solved. I'm still a begginer at JavaScript coding so my request may seem a be easy for you guys to answer so here it is:

I have a JavaScript code and I want it to have a delay of 4 seconds before starting, the code is:

<SCRIPT LANGUAGE="JavaScript">
var password = ''
password=prompt('Please enter your password:','');
if (password != null) {
location.href= password + ".html";
}
</SCRIPT>

I've searched through many sites and I havn't found an answer that'll help me, so i'm hoping that you guys will. :cheesy:

Thanks - Cronos

Research the "Timer" object.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.