Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
WebAsyncRefreshPanel doesn't refresh after using setTimer(0), setTimer(10000)
posted

I have a WebAsyncRefreshPanel that contains a div with an image control in it. The idea is that the image will change every 10 seconds unless the mouse is over it which triggers a tooltip with information. After the mouse is moved off of the image the refreshes should resume.

In the mouseover event of the div I use setTimer(0) to stop the refreshes which works fine. In the mouseout event I use setTimer(10000) and    refresh()...this triggers the refresh the first time but it doesn't refresh after the 10 seconds has elapsed. If I move the mouse back over the image and then off again it again triggers the refresh but only once. Am I missing something here.

 

<script type="text/javascript">

function divImg_MouseOver() {

var panel;

panel = ig_getWebControlById("WebRefreshPanel");

panel.setTimer(0);

}

function divImg_MouseOut() {

var panel;

panel = ig_getWebControlById("WebRefreshPanel");

panel.setTimer(10000);

panel.refresh();

}

</script>

<igmisc:WebAsyncRefreshPanel ID="WebRefreshPanel" Width="550px" Height="412px" runat="server"

RefreshInterval="10000" RefreshTargetIDs="lblTesting,DestImg">

<div id="divImg" runat="server" onmouseover="BLOCKED SCRIPTdivImg_MouseOver();" onmouseout="BLOCKED SCRIPTdivImg_MouseOut();" >

<asp:Image title="" ID="DestImg" runat="server"/>

</div>

 

<input runat="server" type="hidden" id="hdnIndex" value="1" />

</igmisc:WebAsyncRefreshPanel>