Hi. I have catch an loginscript from javascript.nu. This one works excellent. It works like this: when you write in name/pas, you acctualy typing what file that should be opened.
eg. whant to login to “index123.htm”:
name: index
pas: 123
What I now whant is: if you typing a file that NOT excist, it should get you to an site and not to “the site could not been found”. And even bether would it be if a pop-up window came and told “wrong pas!”.
the script looks like this:
[code=html]
<html> <head> <SCRIPT LANGUAGE=”JavaScript”…
<html>
<head>
<SCRIPT LANGUAGE=”JavaScript”>
<!–
defaultStatus=(“”);
//–>
</SCRIPT>
<SCRIPT LANGUAGE=”javascript”>
<!–This is one of many scripts which are available at: *—
//–http://www.JavaScript.nu/javascript *—
//–This script is FREE, but you MUST let these lines *—
//–remain if you use this script. *—
//***—Filändelsen på filen man ska komma till. Kan vara t.ex. “htm” eller “html”.
filandelse=”htm”
function password()
{
if ((document.pass.word.value != “”) && (document.pass.namn.value != “”))
{
sida=document.pass.namn.value+document.pass.word.value+”.”+f
ilandelse
parent.location=sida.toLowerCase()
document.pass.word.value=(“”);
}
}
//–>
</SCRIPT>
</head>
<body>
<FORM METHOD=”post” NAME=”pass” ACTION=”javascript:password();”>
<B><font class=”InputText2″>Namn:</font></B><BR>
<INPUT TYPE=”text” class=”InputText” NAME=”namn”></td></tr><tr><td>
<B><font class=”InputText2″>Lösenord:</font></B><BR
><INPUT TYPE=”password” class=”InputText” NAME=”word”></td></tr><tr><td>
<a href=”link.htm” target=”links”><INPUT TYPE=”button” class=”InputText2″ NAME=”knapp” VALUE=”Logga in” onClick=”password();”></a>
</FORM>
</body>
</html>
I really hope it can be worked out with javascript becouse I dont got .php supported.
edit: I have tried to find help in many forums and I guess you are my only hope left. At least give feedback if it´s even possible to do like this…
You can also watch it at me swedish site: [url=www.wings.info.se]www.wings.info.se
//Hunter