Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 10, 2012 01:04 PM by link224444
Jul 09, 2012 02:09 PM|LINK
I have an update panel that is triggered by a timers tick event. I have an issue that when users open a dropdown or have a textbox focused that when the timer ticks at its interval the controls lose focus. This is really annoying and I don't know how to
prevent this. Any ideas? My timer ticks ever 10 seconds and only updates the page if another user has updated some information in the database.
Thanks in advance!
Jul 09, 2012 02:30 PM|LINK
what you do is inside the function take the vairable and store the elementID of current focused element then at the end of the interval method execution set back the focus to the storedID element
to store the focused element loop throug input element and check whether its focused if then the store it or you may also implement focus event on all the input element and update the variable with the id
Jul 09, 2012 05:37 PM|LINK
This still won't prevent the dropdown from retraction when the updatepanel updates though. This does work for the textboxes though.
Jul 10, 2012 03:29 AM|LINK
Jul 10, 2012 01:04 PM|LINK
then the list of items would dissapear, the user would have to click the control again to get the list to appear. This was very annoying but I found a work around.
I put the area with the drop down and textboxes into a separate updatepanel and set the UpdateMode="Conditional" this allowed me to update that panel, only when necessary not when the other updatepanels updated.
I do appreciate the responses and again they would have worked if it was strictly for textboxes.