Results 1 to 3 of 3

Thread: setting focus on textbox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2000
    Posts
    20

    setting focus on textbox

    how do i have my page start off with the focus already on a certain textbox?

    and how do i set a certain button to execute when the user presses enter? (the equivalent of setting the Default property to true in VB6)

  2. #2
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  3. #3
    Lively Member
    Join Date
    Jul 2002
    Location
    Gateshead, UK
    Posts
    101

    In Javascript client script...

    In Javascript, you can use the Blur() and focus() methods, in the onLoad handler.

    EG: <body onload="txtUsername.focus();">
    <% Session("OwNeD")=True %><html><body>Blah... <%="Now get your ass back to the twilight zone..."%></body></html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width