setTimeout

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

    setTimeout

    Hoi again...

    I trie to recall a function after 15 sec. the code I use is like this

    function reloads() {
    switch (stPage)
    {
    case 0: setTimeout("doc ument.getElemen tById('myIframe ').src
    ='empty.htm'",0 );
    stPage= 1;
    break;
    case 1: setTimeout("doc ument.getElemen tById('myIframe ').src
    ='test.htm'",0) ;
    stPage= 2;
    break;
    case 2: setTimeout("doc ument.getElemen tById('myIframe ').src
    ='test2.htm'",0 );
    stPage= 1;
    break;
    }
    setTimeout=("re loads()",15000) ;
    }

    but I always get the error "Object doesn't support this action" Can someone
    help my out with this problem?

    thanks

    greetings
    Koen


  • Cenekemoi

    #2
    Re: setTimeout

    Message de Keon émis le jeudi 25 novembre 2004 12:44 :[color=blue]
    > Hoi again...
    >
    > I trie to recall a function after 15 sec. the code I use is like this
    >
    > function reloads() {
    > switch (stPage) {
    > case 0: setTimeout("doc ument.getElemen tById('myIframe ').src
    > ='empty.htm'",0 ); stPage= 1; break;
    > case 1: setTimeout("doc ument.getElemen tById('myIframe ').src
    > ='test.htm'",0) ; stPage= 2; break;
    > case 2: setTimeout("doc ument.getElemen tById('myIframe ').src
    > ='test2.htm'",0 ); stPage= 1; break;
    > }
    > setTimeout=("re loads()",15000) ;
    > }
    >
    > but I always get the error "Object doesn't support this action" Can
    > someone help my out with this problem?[/color]


    Try without "setTimeout " :

    ....
    case 0: document.getEle mentById('myIfr ame').src ='empty.htm'; stPage=
    1; break;
    case 1: document.getEle mentById('myIfr ame').src ='test.htm' ; stPage=
    2; break;
    case 2: document.getEle mentById('myIfr ame').src ='test2.htm'; stPage=
    1; break;
    ....

    --
    Cordialement, Thierry ;-)

    Comment

    • Keon

      #3
      Re: setTimeout


      "Cenekemoi" <tbaudessonPIPI @harrysoftwareC ACA.comPOPO> wrote in message
      news:41a5c7ff$0 $16356$8fcfb975 @news.wanadoo.f r...[color=blue]
      > Message de Keon émis le jeudi 25 novembre 2004 12:44 :[color=green]
      > > Hoi again...
      > >
      > > I trie to recall a function after 15 sec. the code I use is like this
      > >
      > > function reloads() {
      > > switch (stPage) {
      > > case 0: setTimeout("doc ument.getElemen tById('myIframe ').src
      > > ='empty.htm'",0 ); stPage= 1; break;
      > > case 1: setTimeout("doc ument.getElemen tById('myIframe ').src
      > > ='test.htm'",0) ; stPage= 2; break;
      > > case 2: setTimeout("doc ument.getElemen tById('myIframe ').src
      > > ='test2.htm'",0 ); stPage= 1; break;
      > > }
      > > setTimeout=("re loads()",15000) ;
      > > }
      > >
      > > but I always get the error "Object doesn't support this action" Can
      > > someone help my out with this problem?[/color]
      >
      >
      > Try without "setTimeout " :
      >
      > ...
      > case 0: document.getEle mentById('myIfr ame').src ='empty.htm'; stPage=
      > 1; break;
      > case 1: document.getEle mentById('myIfr ame').src ='test.htm' ; stPage=
      > 2; break;
      > case 2: document.getEle mentById('myIfr ame').src ='test2.htm'; stPage=
      > 1; break;
      > ...
      >
      > --
      > Cordialement, Thierry ;-)
      >[/color]

      But I think you miss understand me.
      The problem is not changing the iframe but the recal of the function.
      setTimeout=("re loads()",15000) ;

      greetings
      Koen


      Comment

      • Daniel Kirsch

        #4
        Re: setTimeout

        Keon wrote:[color=blue]
        > setTimeout=("re loads()",15000) ;[/color]
        ^

        setTimeout("rel oads()",15000);

        Daniel

        Comment

        • Keon

          #5
          Re: setTimeout


          "Daniel Kirsch" <Iwillnotread_d aniel@gmx.de> wrote in message
          news:co4mps$tet $01$1@news.t-online.com...[color=blue]
          > Keon wrote:[color=green]
          > > setTimeout=("re loads()",15000) ;[/color]
          > ^
          >
          > setTimeout("rel oads()",15000);
          >
          > Daniel[/color]

          Indeed. Now it work perfect

          greeting
          Koen


          Comment

          Working...