Closed Thread Icon

Topic awaiting preservation: password (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8105" title="Pages that link to Topic awaiting preservation: password (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: password <span class="small">(Page 1 of 1)</span>\

 
tariq
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2002

posted posted 03-04-2002 11:54


U may saw this befor:

TASK: one link should be password protected.
If one clicks it the following function opens a new window.
It contains the file (datei).
FUNCTION:
function passwd_window(datei){
passwdFenster= window.open(datei, "passwd", "toolbar, menubar);
}
(datei) is a form to be filled out, with: first name, sur name and 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"></td>
</tr>
</table>
</FORM>

PASSWORD SCRIPT: onece you filled out the form the following script should decide if
it is permited for you to get in:

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 if the form elements are filled out
check = (document.passwdForm.vorname.value == "") ? false : true;
check = (document.passwdForm.nachname.value == "") ? false : true;
check = ( document.passwdForm.password.value == "") ? false : true;
//if NOT filled out alert()
if (check==false){
alert("Bitte fuellen Sie alle Felder aus!");
return false;
}
//else check if permitted
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 PROBLEMS: this script does not work allways.
I found that whether it works or not depends not only on the browser
but also on the platform and weather I execute it intern or extern.
(intern: via file:// ...., extern: via http:// ....).
The following cases occurred:

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
use the first name: ozone, last name: ozone and password: ozone.
thanks

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-04-2002 14:51

Before we go trying to solve the problem, are you aware that password protection via javascript is very easy to get around?

tariq
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2002

posted posted 03-04-2002 19:02

actually it does no matter. I want only to have this link password protected. And if it works with javascript in some cases as I mentioned so I am very snoopy and I'll still thinking of it if I do not get it.
That's to say I want to learn through these experiances :-) .
thanx

« BackwardsOnwards »

Show Forum Drop Down Menu