Results 1 to 2 of 2

Thread: Textbox cursor troubles

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2005
    Posts
    19

    Textbox cursor troubles

    Hi,
    I have a bit of script that I am using to set focus back onto a textbox but when I use it, the cursor is always at the beginning of the text but I need it to be at the end. Does anyone know how to do this?

    Code:
            Dim strBuilder As String
            strBuilder = "<script language = 'javascript'>"
            strBuilder = strBuilder & "document.forms.Form1.txtSearch.focus();"
            strBuilder = strBuilder & "</script>"
            RegisterStartupScript("Focus", strBuilder.ToString)
    That's my code to set the focus back on the text box. Any help in ASP.NET or Javascript will be v.helpful.

    Thanks in advance!!

  2. #2
    Fanatic Member Graff's Avatar
    Join Date
    Jan 2002
    Location
    Calgary
    Posts
    668

    Re: Textbox cursor troubles

    If wishes were fishes we'd all cast nets.

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