Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   setting focus to textbox (http://www.velocityreviews.com/forums/t755996-setting-focus-to-textbox.html)

Tony Piperato 10-23-2003 06:45 PM

setting focus to textbox
 
Hello,

Can someone tell me if/how I can set the focus to a textbox so when the page
loads the cursor is placed in the textbox and the user can just begin
typing?

Thanks.

Pip



Victor Garcia Aprea [MVP] 10-23-2003 08:00 PM

Re: setting focus to textbox
 
Hi Tony,

Its pretty simple, you just need to output some javascript from the
server-side to set the focus to the control you want, take a look at
javascript's focus function. If I remember right, ScottGu[1] has posted a
ppt with some tricks & tips (including the focus one).

[1] http://weblogs.asp.net/scottgu

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup

and not by private mail.
"Tony Piperato" <tonypiperato@hotmail.com> wrote in message
news:u%23QwMXZmDHA.1948@TK2MSFTNGP12.phx.gbl...
> Hello,
>
> Can someone tell me if/how I can set the focus to a textbox so when the

page
> loads the cursor is placed in the textbox and the user can just begin
> typing?
>
> Thanks.
>
> Pip
>
>





All times are GMT. The time now is 08:52 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57