H
harry
Copied the code below from a site sometime ago & although this does what I
want - displays a popup dialog, & allows a "*" password to be entered there
is one problem with it. If you press the "enter" key with the focus on the
text box the window becomes maximized! calling it from JS like this -
var password = showModalDialog('password.html', null,
'status:no;dialogWidth: 430px; dialogHeight: 100px; resizable: no;')
<HTML>
<HEAD>
<SCRIPT>
</SCRIPT>
<title>Enter Password</title></HEAD>
<BODY bgcolor="#CCCCCC">
<TABLE WIDTH="100%" HEIGHT="100%">
<TR>
<TD ALIGN="center" VALIGN="middle">
<FORM NAME="gui">
<p>Enter password : <INPUT TYPE="password" NAME="password">
<INPUT name="button" TYPE="button" ONCLICK="window.returnValue =
document.gui.password.value; window.close();" VALUE=" OK ">
<INPUT name="button" TYPE="button" ONCLICK="window.returnValue =
null; window.close();" VALUE="Cancel">
</p>
</FORM>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Is there a way to sort this? - tried checking key value in onKeyPress()
event & returning null if '13' but still does it.
thanks
harry
want - displays a popup dialog, & allows a "*" password to be entered there
is one problem with it. If you press the "enter" key with the focus on the
text box the window becomes maximized! calling it from JS like this -
var password = showModalDialog('password.html', null,
'status:no;dialogWidth: 430px; dialogHeight: 100px; resizable: no;')
<HTML>
<HEAD>
<SCRIPT>
</SCRIPT>
<title>Enter Password</title></HEAD>
<BODY bgcolor="#CCCCCC">
<TABLE WIDTH="100%" HEIGHT="100%">
<TR>
<TD ALIGN="center" VALIGN="middle">
<FORM NAME="gui">
<p>Enter password : <INPUT TYPE="password" NAME="password">
<INPUT name="button" TYPE="button" ONCLICK="window.returnValue =
document.gui.password.value; window.close();" VALUE=" OK ">
<INPUT name="button" TYPE="button" ONCLICK="window.returnValue =
null; window.close();" VALUE="Cancel">
</p>
</FORM>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Is there a way to sort this? - tried checking key value in onKeyPress()
event & returning null if '13' but still does it.
thanks
harry