Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7489609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:17:10+00:00 2026-05-29T15:17:10+00:00

I have made a clock to show current time with an ajax timer in

  • 0

I have made a clock to show current time with an ajax timer in an ajax update panel. The timer is set to one minute firing the tick event which puts the present time in a label. There are a number of text boxes on the page and when the clock updates the curser jumps to the default focused control and the page jumps to the top. This makes it difficult to fill the form without interuption. How can I maintain control focus and scroll position?
I found an answer here Maintaining focus on ajax update panel after updating form but it’s using javascript without full code (psuedo code as he wrote). I’m weak at javascript so can someone give me a more detailed solution or another alternative?
Thank you.

Edit: Is there not a simple way to find which control has focus at postback time and reset focus to that control when the page reloads? Preferably in c# and if not in javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:17:11+00:00Added an answer on May 29, 2026 at 3:17 pm

    I found that the problem occurred only on pages where I set the focus by code like txtBox.Focus(), but pages where I didn’t set focus by code there’s no problem. So I tried putting the Focus() command in an if not postback condition.

    if(!isPostback)
    {
       txtBox.Focus();
    }
    

    That solved all the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made one project in java. Now in this particular module, i am
I have an application in which i have made a alarm clock. In my
I have a slide show which is made up of a divs. Each Div
i have a link_to_remote method : <%= link_to_remote Country, :url =>{:controller =>'country',:action=>'get_country_info',:id=>@count_id.to_i},:update=>Details6,:loading => Element.show('loader');,:complete
The demo page: CLICK HERE I have made a picture to show: As clearly
I have made the ArrayList and addind the value one by one in it
Ok, I have made a twitter-style control panel to apply filters and sorting to
I have made a SVG image, or more like mini application, for viewing graphs
I have made some code which exports some details of a journal article to
I have made a custom UserControl i Vb.net (windows application). How can I add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.