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
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to ignore textbox control focus while using TAB.

How to ignore textbox control focus while using TAB.

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nettutorial
3 Posts 3 Posters 0 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.
  • A Offline
    A Offline
    Asif Rehman
    wrote on last edited by
    #1

    I want to ignore a TextBox Control from getting focus() while pressing TAB key. I know there's no property Tabstop for TextBox control in asp.net. I want to know how to do it in JavaScript. Regards Asif Rehman

    B T 2 Replies Last reply
    0
    • A Asif Rehman

      I want to ignore a TextBox Control from getting focus() while pressing TAB key. I know there's no property Tabstop for TextBox control in asp.net. I want to know how to do it in JavaScript. Regards Asif Rehman

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      Asif Rehman wrote:

      I know there's no property Tabstop for TextBox control in asp.net

      Yes there is no property for this.

      Asif Rehman wrote:

      I want to know how to do it in JavaScript.

      There is no need for this. Set the TabIndex property of the textbox as -1.Now while pressing the tab, focus wont come on the textbox.

      Cheers!! Brij Visit my Blog: http://brijbhushan.net
      Check my latest Article :Client Templating with jQuery

      1 Reply Last reply
      0
      • A Asif Rehman

        I want to ignore a TextBox Control from getting focus() while pressing TAB key. I know there's no property Tabstop for TextBox control in asp.net. I want to know how to do it in JavaScript. Regards Asif Rehman

        T Offline
        T Offline
        TweakBird
        wrote on last edited by
        #3

        Have a look on this http://bytes.com/topic/c-sharp/answers/275037-disable-tab-key You don't want to move a focus to specific control? For some reason, you don't want to some control receive a focus. That could be a case if, for example you have an invisible text box or some search text box on top of the web page, but you want to allow tab functionality only to few main controls on the web form. Simply set TabIndex property of server control, or tabindex attribute of HTML control to -1. When you run web page and hit tab key, controls with TabIndex = -1 will never get a focus. Although, user can click into this control with a mouse and set focus on that way.

        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