For testing purposes I have my session timeout set to 3 minutes. 2 minutes before session timeout the popup will appear. If I click "Continue" it stays on the page and hides the dialog. A minute later it will popup again as expected, but this time clicking the "Continue" button doesn't work at all.
I am not getting any javascript errors. If I put an alert in the ContinueSession method I get there after the first click, but not after the second click.
Javascript Code:
HTML Code:
Code Behind:
I am not getting any javascript errors. If I put an alert in the ContinueSession method I get there after the first click, but not after the second click.
Javascript Code:
<script language="javascript"> //a flag to ease the logic which determines whether to redirect the user //will not redirect if the RadButton is clicked var toRedirect = true; function OnClientHiding(sender, args) { if (toRedirect) { window.location.href = sender.get_value(); } } function ContinueSession() { var notification = $find("<%= rnSessionTimeout.ClientID %>"); toRedirect = false; notification.update(); notification.hide(); } function OnClientShowing() { //raise the flaga again so that a redirect will occur if the notification autocloses toRedirect = true; }</script>HTML Code:
<telerik:RadNotification ID="rnSessionTimeout" runat="server" Position="Center" Width="300" Height="125" LoadContentOn="PageLoad" AutoCloseDelay="105000" Title="Session Expiration" TitleIcon="Warning" OnClientShowing="OnClientShowing" ContentIcon="Warning" Skin="Default" EnableRoundedCorners="true" OnClientHiding="OnClientHiding"> <ContentTemplate> <p align="left"> Your session is about to expire. Do you wish to continue using this site?<br /> <telerik:RadButton Skin="Default" ID="continueSession" runat="server" Text="Continue Your Session" Style="margin-top: 10px;" OnClientClicked="ContinueSession" Autopostback="false" /> </p> </ContentTemplate></telerik:RadNotification>Code Behind:
Protected Sub rnSessionTimeout_CallbackUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadNotificationEventArgs) Handles rnSessionTimeout.CallbackUpdateEnd Sub