This is the button.
<input type="button"
value="Login"
MM_openBrWindow('login.htm','Login','width=40,height=30
')" />
This is the popup login window.
<form>
<table>
<tr>
<td>
<div align="left">Username:
</td>
</tr>
<tr>
<td>
<input name="username"
type="text" value=""
/> </td>
</tr>
<tr>
<td>
Password:
</td>
</tr>
<tr>
<td>
<input type="password"
name="password" /> </td>
</tr>
</table>
<table width="149">
<tr>
<td width="69">
<input type="button"
value="Login"
onClick="Login(this.form)" />
</td>
<td width="68">
<div align="right">
<input name="Reset"
type="reset"
onclick="MM_goToURL('parent','Index.htm');return
document.MM_returnValue" value="Back"
/>
</div>
</td>
</tr>
</table>
</form>
Ths is the javascript.
<!-- Begin
function Login(form) {
username = new Array("admin");
password = new Array("password");
page = "index/secure" + ".htm";
if (form.username.value == username[0] &&
form.password.value ==
password[0]) {
self.location.href = page;
}
else {
alert("Either the username or password you entered is
incorrect.\nPlease try again.");
form.username.focus();
}
return true;
}
// End -->
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Information googlegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
-~----------~----~----~----~------~----~------~--~---
|