Could you look at this and see where it is failing... It just blows right through it. The buttons and such appear, but it doesn't wait for the user to type/click

code:
Function IEInputBox($window, Optional $prompt, optional $Ok, optional $Cancel)
Dim $click, $html

If not $prompt $prompt = "Please enter your password." endif
If not $ok $ok = "OK" endif
If not $Cancel $cancel = "Cancel" endif

$html = '
<html><head><style>
<!---body{ background-color: silver; color: black;font-family: tahoma, arial; font-size:
10pt; margin: 3px "input.tbox { border: lpx black solid;}td { font: 10pt tahoma; }--->
</style></head>
<body scroll=no >
<table align=center>
<form name=frm>
<tr>
<td align=right>$prompt </td>
<td colspan=2><input id=password1 type=password value="" class=tbox></td>
</tr>
<tr>
<td><input id=ok type=button value=" $ok " onclick="frm.status.value=1">
<input type=hidden id=status name=status value=0></td>
<td align=right><input id=cancel type=button value=" $Cancel "
onclick="frm.status.value=2"></td>
</tr>
</form>
</table></body></html>'

$window.document.write('$html')
WHILE $window.busy <> 0 AND @ERROR = 0 LOOP

$=setfocus($window.title+" - Microsoft Internet Explorer")
$window.GetElementById("password1").focus
$status = $window.GetElementById("status")
$click = $window.GetElementById("password1")
while @error = 0 and $status.value = ""
select
case $status.value = "1" ;Ok was clicked
$IEInputBox = $password1.value
case $status.value = "2" ;cancel was clicked
$IEInputBox = "Cancel"
endselect
loop
$window.quit
$window=""
EndFunction

_________________________
How to ask questions the smart way <-----------> Before you ask