[jQuery] input field focus help!

[jQuery] input field focus help!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=611004723-16112006><FONT face=Arial color=#0000ff size=2>Thanks
Erik for the input but it doesn't work... c",)</FONT></SPAN></DIV>
<DIV><SPAN class=611004723-16112006></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Erik
Beeson<BR><B>Sent:</B> Friday, November 17, 2006 7:34 AM<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] input field focus
help!<BR><BR></FONT></DIV>.focus() does NOT set the focus of an element, it
fires all of the registered onfocus events. Use
$("").get(0).focus().<BR><BR>--Erik<BR><BR>
<DIV><SPAN class=gmail_quote>On 11/16/06, <B class=gmail_sendername>Clodelio
Delfino</B> <<A
href="mailto:clodelio.delfino@mno.atmel.com">clodelio.delfino@mno.atmel.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">i've
downloaded thickbox and tried the login demo, the dialog box work
as<BR>expected however but when i tried to set an autofocus on the username
field,<BR>it doesn't work.<BR><BR>below is a snippet of the
code:<BR><BR>default.php has the clickable:<BR><BR><a
href="login.php?height=200&width=300" class="thickbox"
title="Please<BR>Login">Click Login</a><BR><BR><BR>login.php is the
form with code below:<BR><BR><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"<BR>"<A
href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</A>">
<BR><html xmlns="<A
href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"><BR><head><BR><title>Test
Only</title><BR><meta http-equiv="content-type"
content="text/html;charset=utf-8"> <BR><script
type="text/javascript"<BR>src="./libraries/jquery-latest.pack.js"></script><BR><script
type="text/javascript"><BR>    $(document).ready(function()
{<BR>        /*$("#frmLogin
input[@name='frmUsername']").attr('disabled',true)*/ <BR>/* just to test
that im correctly referencing the correct field
*/<BR>        $("#frmLogin
input[@name='frmUsername']").focus()<BR>    })<BR></script><BR></head><BR><body><BR><!--
Section:Content --> <BR><div id="divContent"><BR><form
id="frmLogin" method="post" action="check_credential.php"><BR><table
class="tblForm"><BR>    <caption>&nbsp;</caption>
<BR>    <tr><BR>        <td
class="frmField">ID
Number</td><BR>        <td
class="frmInput"><input name="frmUsername" type="text"
size="20"<BR>maxlength="20"  /></td>
<BR>    </tr><BR>    <tr><BR>        <td
class="frmField">Password</td><BR>        <td
class="frmInput"><input name="frmPassword"
type="password"<BR>size="20" maxlength="20"
/></td><BR>    </tr><BR>    <tr><BR>        <td>&nbsp;</td><BR>        <td
class="frmInput"><BR>            <input
name="btnLogin" type="submit" value="Login" />
<BR>        </td><BR>    </tr><BR></table><BR></form><BR></div><BR><!--
[Section:Content] --><BR></body><BR></html><BR><BR><BR>Need
inputs and thanks in
advance....<BR><BR><BR>cdelfino<BR><BR><BR><BR>_______________________________________________<BR>jQuery
mailing list<BR><A
href="mailto:discuss@jquery.com">discuss@jquery.com</A><BR><A
href="http://jquery.com/discuss/">http://jquery.com/discuss/
</A><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/