I create a window object then set the html with a form element. I
want to set focus to the text field inside the form. Is this
possible?
This is the hidden div on the page with the html I want to use inside
the window:
<div id="login" style="visibility:hidden;"><form name="frmAccessKey"
method="post"
action="javascript:ajax_enterAccessCode('<? echo
($_SESSION[height]-300)/2;?>','<? echo ($_SESSION[width]-300)/2;?>')">
<div align="center">
<? if ($error == 1){ echo '<span
class="style27">Access code is invalid, please try again.</span><br
/>'; } ?>
Enter your access code to login: <br />
<input name="accessKey" type="password"
id="accessKey" style="font-size:24px;" size="8" maxlength="10" />
</div>
</form></div>
This is the script I use to make the window and set the html:
<script>
nonClosableWindow = new Window('dialog3', {className: "Gilouche",
title: "LOGIN",
top:topParam,
left:leftParam, width:300, height:100,
closable: false})
nonClosableWindow.getContent().innerHTML = '<table width="100%"
height="100%"><tr><td valign="middle" align="center">'+
$('login').innerHTML+"</td></tr></table>";
nonClosableWindow.show();
$('accessKey').focus();
</script>
I want to set focus to 'accessKey' but nothing seems to work. Thanks!
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com