Script Categories













Menus and Navigation >>> Htaccess Login.

Allows you to have a login box embedded in your web page for pages that normally is only available through a pop up dialogue box.

Username:

Password:

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var htsite = "http://" + username + ":" + password + "@" + server;
window.location = htsite;
}
else {
alert("Please enter your username and password.");
   }
}
//  End -->
</script>
<!-- The hidden form field "server" needs to be the
     address of your password protected directory. -->
<form name=login>
<input
type="hidden" name="server" value="www.domain.com/secure/">
Username:
<input type=text name=username size=20>
<br><br>
Password:
<input type=password name=password size=20>
<input
type=button value="Login!" onClick="Login(this.form)" name="button">
</form>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©