[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=814012000-17112006><FONT face=Arial color=#0000ff size=2>Thanks
Glen for the reply, but doesn't work also...below are some  attempts
btw...</FONT></SPAN></DIV>
<DIV><SPAN class=814012000-17112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006>$("#frmLogin
input[@name='frmUsername']").get(0).focus()</SPAN></DIV>
<DIV><SPAN class=814012000-17112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006>$("#frmLogin
input").get(0).focus()</SPAN></SPAN></DIV>
<DIV><SPAN class=814012000-17112006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006>$("#frmLogin
input[@name='frmUsername']")[0].focus()</SPAN></SPAN></DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><FONT
face=Arial color=#0000ff size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><SPAN
class=814012000-17112006><SPAN class=814012000-17112006>$("#frmLogin
input")[0].focus()</SPAN></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><SPAN
class=814012000-17112006><SPAN
class=814012000-17112006></SPAN></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><SPAN
class=814012000-17112006><SPAN class=814012000-17112006><FONT face=Arial
color=#0000ff size=2>Above doesn't work...either
c",)</FONT></SPAN></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><SPAN
class=814012000-17112006><SPAN class=814012000-17112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=814012000-17112006><SPAN class=814012000-17112006><SPAN
class=814012000-17112006><SPAN class=814012000-17112006><FONT face=Arial
color=#0000ff size=2>cdelfino</FONT></SPAN></SPAN></SPAN></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>Glen
Lipka<BR><B>Sent:</B> Friday, November 17, 2006 8:04 AM<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> Re: [jQuery] input field focus
help!<BR><BR></FONT></DIV>
<DIV>What about $("#whatever")[0].focus();</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV>Glen<BR><BR> </DIV>
<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: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>Thanks Erik for the input
but it doesn't work... c",)</FONT></SPAN></DIV>
<DIV><SPAN class=e id=q_10ef32ff19fc122a_1>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV dir=ltr align=left><FONT face=Tahoma size=2>-----Original
Message-----<BR><B>From:</B> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss-bounces@jquery.com"
target=_blank>discuss-bounces@jquery.com </A>[mailto:<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss-bounces@jquery.com"
target=_blank>discuss-bounces@jquery.com</A>]<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
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:clodelio.delfino@mno.atmel.com"
target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
target=_blank>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</A>">
<BR><html xmlns="<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://www.w3.org/1999/xhtml"
target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com" target=_blank>discuss@jquery.com
</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/
</A><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></SPAN></DIV></DIV><BR>_______________________________________________
<BR>jQuery mailing list<BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:discuss@jquery.com">discuss@jquery.com</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="http://jquery.com/discuss/"
target=_blank>http://jquery.com/discuss/</A><BR><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/