SK: setFimeout Funktion funktioniert nicht :)

Hallo allerseits!

Ich habe folgende Funktion in einer Seite eingebaut:

function frameReload(url,frame) {
parent.frames[frame].location.reload();
window.setTimeout(location.href = url,6000);
}

Jetzt hab ich aber das Problem, dass die setTimeout Funktion nicht läuft. Der location.href Befehl wird zwar ausgeführt, jedoch nicht erst nach den 6000 Millisekunden, sondern sofort.

Was mache ich falsch?

Danke
Sascha

  1. Moin Moin !

    window.setTimeout(location.href = url,6000);

    Was hat setTimeout für Argumente? => SelfHTML -> Javascript -> Objekt-Referenz
    Was hat der Ausdruck location.href=url für einen Rückgabewert? (Tip: wie in C: rechte Seite!)

    Alexander

    --
    Nein, ich beantworte keine Fragen per eMail. Dafür ist das Forum da.
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so!"
  2. Hallo Sascha,

    ich denke,

    window.setTimeout("location.href = url",6000);

    sollte gehen. (ungetestet)

    Gruß Olaf