Timer in master page is affecting dropdown elements in master and content pages
I'm updating an image in an UpdatePanel in my master page using a asp:timer and some code behind to randomly switch images every 5 seconds. This works well, but the timer's tick event that I use for switching images seems to interfere with a dropdown in a content page. For example, while attempting to make a selection in a dropdown, the tick event will collapse the dropdown and I have to drop it down again and make the selection quickly before the next tick event closes it again. Same behavior occurs in the main menu, where a main menu item that is opened to show submenu items closes on the timer event.
In the master page, I have tried scoping the update panel to include the content page, as well as scoping it tightly to the image element only, and the behavior is the same. Would appreciate any advice on what's causing the issue and what can be done. Thanks.
Re: Timer in master page is affecting dropdown elements in master and content pages
Any action on the ASP is considered user action (the timer tick triggers events just like a user click would), so the browser will collapse the menu because it thinks the user has now clicked the image...
Two choices.
#1: Pause the timer when the drop down is active..
#2: Use Flash to switch the images (generally accepted method to do image rotations)
Re: Timer in master page is affecting dropdown elements in master and content pages
Thanks for the reply... I'm seeing that timer events and code behind are not really the best way to switch images. I'm now looking into doing it with javascript... will update once I've got something working.