ChrisB: Wahlweise Seite laden im IE kein Problem

Beitrag lesen

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.“