You are here: irt.org | FAQ | JavaScript | Password | Q1131 [ previous next ]
Only by opening a little window containing a password form field:
<script language="JavaScript"><!--
function getPassword() {
WinId = window.open('','newwin','width=100,height=100');
if (!WinId.opener) WinId.opener = self;
Text = '<form ';
Text += 'onSubmit="opener.location=this.password.value + \'.html\'; self.close()">';
Text += '<input type="password" name="password">';
Text += '<\/form>';
WinId.document.open();
WinId.document.write(Text);
WinId.document.close();
}
//--></script>