Click to See Complete Forum and Search --> : modify this script to make it countdown


moondance
08-29-2003, 10:21 AM
This is probably really simple but my knowledge of javascript is nil.

I have this page that pops up after someone submits a contact form, its just your everyday thanks blah blah.

It closes itself in 4 seconds - i was wondering if the time could countdown dynamically?

Heres what i've got:

<script language = "Javascript">

var howLong = 4000;

t=null
function closeMe(){
t = setTimeout("self.close()",howLong);
}
</script>

<body onload = "closeMe();self.focus()">
We have received your enquiry and will get back to you soon.
<Br><BR>
This window will close in 4 seconds
<br>



Thanks

David Harrison
08-29-2003, 01:49 PM
Hows this:

moondance
09-01-2003, 08:52 AM
Thats exactly what i was looking for.


I thank you very much for your time.

:D :D

David Harrison
09-01-2003, 11:55 AM
Happy to help. :)