SetTimeout not working correctly in IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tshad

    SetTimeout not working correctly in IE

    I have a script to close my window after a specified amount of time (in this
    case about 15 seconds).

    *************** *************** *************** *
    <script language="javas cript">
    function KillMe()
    {
    setTimeout("sel f.close()",1500 0);
    }
    </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.


  • motym123@yahoo.com

    #2
    Re: SetTimeout not working correctly in IE

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

    Comment

    • Randy Webb

      #3
      Re: SetTimeout not working correctly in IE

      tshad wrote:[color=blue]
      > I have a script to close my window after a specified amount of time (in this
      > case about 15 seconds).
      >
      > *************** *************** *************** *
      > <script language="javas cript">
      > function KillMe()
      > {
      > setTimeout("sel f.close()",1500 0);
      > }
      > </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?[/color]

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


      --
      Randy
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      • Randy Webb

        #4
        Re: SetTimeout not working correctly in IE

        motym123@yahoo. com wrote:
        [color=blue]
        > You have the syntax correct, Its probally another Microsoft bug.[/color]

        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.javas cript FAQ - http://jibbering.com/faq

        Comment

        • tshad

          #5
          Re: SetTimeout not working correctly in IE

          "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
          news:4b6dnSpers 3NRDLcRVn-1A@comcast.com. ..[color=blue]
          > tshad wrote:[color=green]
          >> I have a script to close my window after a specified amount of time (in
          >> this case about 15 seconds).
          >>
          >> *************** *************** *************** *
          >> <script language="javas cript">
          >> function KillMe()
          >> {
          >> setTimeout("sel f.close()",1500 0);
          >> }
          >> </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?[/color][/color]

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

          Tom.
          [color=blue]
          >
          > Define "doesn't work". It works just fine, in 15 seconds, in IE6 XP SP2
          > for me.
          >
          >
          > --
          > Randy
          > comp.lang.javas cript FAQ - http://jibbering.com/faq[/color]


          Comment

          Working...