This is a migrated thread and some comments may be shown as answers.

Is it possible to disable focus on AjaxRequest

1 Answer 133 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Oliver Dallet
Top achievements
Rank 1
Oliver Dallet asked on 07 Apr 2010, 10:52 AM
Hello,
I'm writting this post because i have an issue with the automatic focus on the updated control after Ajax Request. I apologize in advance for my awful english which isn't my mother tongue...

Here is my scenario :

- I have  a WebControl on my master page. This webcontrol makes a request to an Exchange Web Service returning the number of unred messages for the current user.
- The request to the Web Service is done asynchronously by Ajax after the page is loaded. As the request can take a few second to success, i don't want this request to happen in the code behind loading event.
- Globally everything works fine, but the problem is the automatic focus on the updated control after the ajax request. If the user scrolls down the page in order to read the text (for example) the browser automatically scrolls to the top (where my WebControl is) in order to focus on the updated control (which is a simple label).
- The web request is currently triggerred by an Ajax Timer (in order to refresh the number of unread mails each 5 minutes). I have also tried to fire the ajax request in the javascript page load. The result is always the same...
- I'm using a RadAjaxManager (i tried with a RadAjaxPanel : the result is the same and the Timer has a weird behavior...) and i'm in a MOSS 2007 environment.
- I have red some posts about focusing controls after a request, but in my scenario there are not necesseraly any controls selected.

So here is my question : Is there any way to disable the automatic focus on the updated control? My goal is to update this control in the background without any focus on it after the request.

Thanks in advance,
Best regards
Dallet Olivier

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 12 Apr 2010, 11:37 AM
Hello Oliver,

The behavior you are facing is expected as this is how the MS Ajax Framwork works. Currently we are able to overcome it with javascript only as in the attached sample.

Kind regards,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Oliver Dallet
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or