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. Focus is going on address bar

Focus is going on address bar

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
3 Posts 2 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.
  • J Offline
    J Offline
    Jagz W
    wrote on last edited by
    #1

    I have aspx page containing dropdown, textbox,divs , panel and buttons i have set the tabindex property of each control. when page load i set the focus on a drop down by using this function Private sub Setfocus(Byval Ctrl as control) Dim Fs as string ="document.getElementById('" + ctrl.ClientId + "').focus();" Page.RegsisterStartUp("FOCUSSCRIPT",FS) End Sub Now when i press tab the focus goes on address bar first then comes to second control What will be the reason?? Note: I am using ASP.Net 1.1 Please Help Its Urgent

    One person's data is another person's program. --J.Walia

    M 1 Reply Last reply
    0
    • J Jagz W

      I have aspx page containing dropdown, textbox,divs , panel and buttons i have set the tabindex property of each control. when page load i set the focus on a drop down by using this function Private sub Setfocus(Byval Ctrl as control) Dim Fs as string ="document.getElementById('" + ctrl.ClientId + "').focus();" Page.RegsisterStartUp("FOCUSSCRIPT",FS) End Sub Now when i press tab the focus goes on address bar first then comes to second control What will be the reason?? Note: I am using ASP.Net 1.1 Please Help Its Urgent

      One person's data is another person's program. --J.Walia

      M Offline
      M Offline
      mr_muskurahat
      wrote on last edited by
      #2

      why dont you use ctrl.focus() property why you want to register startup srcipt. actually focus goes to address bar only in the case when we start tabindex from zero.. locate in your code if you have set tabindex to zero. try to start it from 1 your problem will be sovled....

      Government Dyal Singh College Lahore.

      J 1 Reply Last reply
      0
      • M mr_muskurahat

        why dont you use ctrl.focus() property why you want to register startup srcipt. actually focus goes to address bar only in the case when we start tabindex from zero.. locate in your code if you have set tabindex to zero. try to start it from 1 your problem will be sovled....

        Government Dyal Singh College Lahore.

        J Offline
        J Offline
        Jagz W
        wrote on last edited by
        #3

        thanks my problem is solved

        One person's data is another person's program. --J.Walia

        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