André Derron: Wahlweise Seite laden im IE kein Problem

Hallo NG
Situation:
Der Benutzer gibt ein Passwort ein. Ist es richtig wird test1.htm
sonst test2.htm geladen. Im IE funktioniert es in Opera, Moz nicht

Ich suche schon ne Ewigkeit im Google, werd aber einfach nicht schlau
Hat jemand eine Idee?
Besten Dank im Voraus
André

--- Das läuft auf dem Server (PHP) --------

  
if ( $pw == "4711" ) {  
 echo "<meta http-equiv=\"refresh\" content=\"0; URL=test1.htm\">";  
} else {  
 echo "<meta http-equiv=\"refresh\" content=\"0; URL=test2.htm\">";  
}  

--- Das Lokal (JS) -------------------------

  
var pw = document.getElementById("pw").value;  
if ( pw == "" ) return false;  
  
var act = document.getElementById("act");  
act.setAttribute("action","login.php?pw=" + pw);  
return true  

  1. Warum schreibst Du das Feld#pw mit Name pw nicht einfach ins form#act?

    Gruß, LX

    --
    X-Self-Code: sh:( fo:) ch:~ rl:° br:> n4:& ie:% mo:) va:) de:] zu:) fl:{ ss:) ls:~ js:|
    X-Self-Code-Url: http://emmanuel.dammerer.at/selfcode.html
    X-Will-Answer-Email: Unusual
    X-Please-Search-Archive-First: Absolutely Yes
    1. Hallo LX

      Danke vorerst mal

      Warum schreibst Du das Feld#pw mit Name pw nicht einfach ins form#act?

      Wie genau, ohne js, kann ich das pw mitliefern??
      Auf meiner HTML-Seite ist action leer, das fülle ich dann js.

      Gruss und tx
      André

      1. Hi,

        Warum schreibst Du das Feld#pw mit Name pw nicht einfach ins form#act?
        Wie genau, ohne js, kann ich das pw mitliefern??

        In dem du ein ganz normales Formular machst, und abschickst.

        Auf meiner HTML-Seite ist action leer, das fülle ich dann js.

        Dann mach action voll.

        MfG ChrisB

        --
        „This is the author's opinion, not necessarily that of Starbucks.“
        1. Hallo,

          Dann mach action voll.

          Würde ich ja gerne, weiss einfach nicht was da reingehört
          action="login.php???????????"

          Gruss
          André

          1. Hi,

            Dann mach action voll.
            Würde ich ja gerne, weiss einfach nicht was da reingehört
            action="login.php???????????"

            Die Fragezeichen gehoern durch *nichts* ersetzt.

            MfG ChrisB

            --
            „This is the author's opinion, not necessarily that of Starbucks.“
            1. Hallo ChrisB

              Die Fragezeichen gehoern durch *nichts* ersetzt.

              Danke für deine Geduld
              Hab zuvor noch nie mit <form> gearbeitet und deshalb viel zu weit gesucht.
              Nun funktioniert die Seite reibungslos

              Gruss, André

  2. Hi,

    --- Das läuft auf dem Server (PHP) --------

    if ( $pw == "4711" ) {
    echo "<meta http-equiv="refresh" content="0; URL=test1.htm">";
    } else {
    echo "<meta http-equiv="refresh" content="0; URL=test2.htm">";
    }

      
    Dass das kein wirklicher Schutz ist, ist dir klar?  
      
    
    > --- Das Lokal (JS) -------------------------  
    > ~~~javascript
      
    
    > var pw = document.getElementById("pw").value;  
    > if ( pw == "" ) return false;  
    >   
    > var act = document.getElementById("act");  
    > act.setAttribute("action","login.php?pw=" + pw);  
    > return true  
    > 
    
    

    Und was ist dieses act - ein Formular?
    Was willst du dann hier ueberhaupt mit JavaScript? Warum schickst du nicht einfach ein ganz normales Formular ab?

    Und wird die Adresse denn nach dem Absenden wie gewuenscht aufgerufen, oder ...?

    MfG ChrisB

    --
    „This is the author's opinion, not necessarily that of Starbucks.“