Problem with ShowModalDialog in i.e 5.5

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">
&nbsp;
<INPUT name="button" TYPE="button" ONCLICK="window.returnValue =
document.gui.password.value; window.close();" VALUE=" OK ">
&nbsp;
<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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top