U may saw this befor:
In order to let only certain persons to the content of a sub page
I wrote the folloing csript:
function passwd_window(datei){
passwdFenster= window.open(datei, "passwd", "toolbar, menubar);
}
So onClick one gets a window with the file "datei".
It is a password form:
<FORM NAME="passwdForm" onSubmit="pssw('teppHaendler.html');" method="get">
<table bordercolor="brown" border=1>
<TR><TD>Vorname:<INPUT TYPE=text NAME="vorname" SIZE=15></td>
<TD>Nachname:<INPUT TYPE=text NAME="nachname" SIZE=15></td>
<TD>Password:<INPUT TYPE=password NAME="password" SIZE=15></td>
</tr>
<TR><TD COLSPAN=3 align=center>
<INPUT TYPE=submit value="l o g i n" style="filter: alpha(opacity=70, style=1)"></td>
</tr>
</table>
</FORM>
This form uses the following script to permit access:
Vorname = new Array (0, "ma", "mu", "mi");
Nachname = new Array (0, """""");
Password = new Array (0, """"");
var l = Vorname.length
function pssw(makan){
var check=true;
check = (document.passwdForm.vorname.value == "") ? false : true;
check = (document.passwdForm.nachname.value == "") ? false : true;
check = ( document.passwdForm.password.value == "") ? false : true;
if (check==false){
alert("Bitte fuellen Sie alle Felder aus!");
return false;
}
else{
for (j=1; j<=l-1; j++){
if (((document.passwdForm.vorname.value == Vorname[j])
&& document.passwdForm.nachname.value == Nachname[j])
&& document.passwdForm.password.value == Password[j]){
var a=Vorname[j];
var b=true;
var c=true;
var d=true;
document.location=makan;
}
}
if ((b && c) && d){
alert ("\nHallo_____________________________________________\n\n" +
" _________________________________ "+a);
document.location=makan;
}
else if ((b && c) && !d){
alert(a+": Du hast Dein Password vergessen !!\n"+
"Kein Problem, .... \n"+
"ein Grund mehr tariq anzurufen :-).");
}
else if ((b && !c) && !d){
alert("Hallo "+ a+": Sie haben keinen Zugriffsrecht.\n"+
"Falls Sie dennoch diese Seite Anschauen moechten\n"+
"bitte kontaktieren Sie Tariq Mahmoud");
}
else if ((!b && !c) && !d){
alert("Hallo:\n Sie haben keinen Zugriffsrecht.\n"+
"Falls Sie dennoch diese Seite Anschauen moechten\n"+
"bitte kontaktieren Sie Tariq Mahmoud");
}
}
return true;
}
+++++++++++++++++The problem ++++++++
1) when executed intern with NS on a Linux plattform it works.
2) = = extern (via http) with NS on a linux PF it DOS NOT work. It just reloads the form.
3) when executen with NS (extern via http) on Windows plattform it works.
4) with ie extern it does not work.
Check it http://mahmoud.home.cern.ch/mahmoud/) Then novella