Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to get the focus on window or browser

how to get the focus on window or browser

Scheduled Pinned Locked Moved ASP.NET
tutorial
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jayakumarb
    wrote on last edited by
    #1

    i have a form in that if my curser is there in textbox then i pree backspace then the form will go back page, but my focus will be ther in the form then my backspace is want to disable please tell me ans, it's argent bjayakumar hyd india

    H P 2 Replies Last reply
    0
    • J jayakumarb

      i have a form in that if my curser is there in textbox then i pree backspace then the form will go back page, but my focus will be ther in the form then my backspace is want to disable please tell me ans, it's argent bjayakumar hyd india

      H Offline
      H Offline
      Haissam
      wrote on last edited by
      #2

      use window.focus(); ( javascript)

      Best Regards, Haissam Abdul Malak My Blog

      1 Reply Last reply
      0
      • J jayakumarb

        i have a form in that if my curser is there in textbox then i pree backspace then the form will go back page, but my focus will be ther in the form then my backspace is want to disable please tell me ans, it's argent bjayakumar hyd india

        P Offline
        P Offline
        postmaster programmingknowledge com
        wrote on last edited by
        #3

        in your form RegisterStartupScript("setFocus", Utilities.SetFocus(txtName)) in global Public Function SetFocus(ByVal FocusControl As Control) As String 'Setting focus to supplied control Dim Script As New System.Text.StringBuilder Dim ClientID As String = FocusControl.ClientID 'Building java script With Script .Append("") .Append("document.getElementById('") .Append(ClientID) .Append("').focus();") .Append("") End With Return Script.ToString() End Function ================================================ http://www.programmingknowledge.com/[^] ================================================

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups