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
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