Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > SetTimeout not working correctly in IE

Reply
Thread Tools

SetTimeout not working correctly in IE

 
 
tshad
Guest
Posts: n/a
 
      12-01-2004
I have a script to close my window after a specified amount of time (in this
case about 15 seconds).

**********************************************
<script language="javascript">
function KillMe()
{
setTimeout("self.close()",15000);
}
</script>
</head>

<body style="margin:0" onLoad="KillMe();">
************************************************** **

This script works fine in Mozilla, but in IE it stays open for about 2
seconds and closes.

Why doesn't it work for IE?

Thanks,

Tom.


 
Reply With Quote
 
 
 
 
motym123@yahoo.com
Guest
Posts: n/a
 
      12-03-2004
You have the syntax correct, Its probally another Microsoft bug.

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      12-03-2004
tshad wrote:
> I have a script to close my window after a specified amount of time (in this
> case about 15 seconds).
>
> **********************************************
> <script language="javascript">
> function KillMe()
> {
> setTimeout("self.close()",15000);
> }
> </script>
> </head>
>
> <body style="margin:0" onLoad="KillMe();">
> ************************************************** **
>
> This script works fine in Mozilla, but in IE it stays open for about 2
> seconds and closes.
>
> Why doesn't it work for IE?


Define "doesn't work". It works just fine, in 15 seconds, in IE6 XP SP2
for me.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      12-03-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> You have the syntax correct, Its probally another Microsoft bug.


Had you tested it, you would have found the answer. But its easier to
say "Oh, its an MS bug" than it is to test it and find out.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
tshad
Guest
Posts: n/a
 
      12-03-2004
"Randy Webb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> tshad wrote:
>> I have a script to close my window after a specified amount of time (in
>> this case about 15 seconds).
>>
>> **********************************************
>> <script language="javascript">
>> function KillMe()
>> {
>> setTimeout("self.close()",15000);
>> }
>> </script>
>> </head>
>>
>> <body style="margin:0" onLoad="KillMe();">
>> ************************************************** **
>>
>> This script works fine in Mozilla, but in IE it stays open for about 2
>> seconds and closes.
>>
>> Why doesn't it work for IE?


In my case, it just stays there for IE, but not for mozilla.

Tom.

>
> Define "doesn't work". It works just fine, in 15 seconds, in IE6 XP SP2
> for me.
>
>
> --
> Randy
> comp.lang.javascript FAQ - http://jibbering.com/faq



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SetTimeout not working with IE Shan Javascript 4 02-24-2008 02:06 AM
SetTimeout not working Darren.Ratcliffe@gmail.com Javascript 3 08-14-2006 10:32 PM
setTimeout not working on IE James Black Javascript 2 04-14-2006 06:37 PM
setTimeout not working on Mac IE 5.2 Athanasius Javascript 2 05-07-2005 12:29 AM
Cisco 1721 and routing not working correctly Brian Cisco 4 10-24-2003 10:37 PM



Advertisments