Hi All
I am having problems getting a rad window to reset a timer on the parent page. Below is the code I have in place.
-- The below code is on the Parent Page
-- This code is on the Rad Window and is called by the OnClick() of a standard HTML button
This code is to create an application timeout / warning feature using code based on this post: http://www.telerik.com/community/forums/aspnet/window/automatic-logout-using-rad-window-and-rad-ajaxtimer.aspx
Basically, the radwindow is opened by the the radTimer1 (this piece works fine). When radTimer2 hits, the site is sent to a timout page. What I need to happen is for radTimer2 to be reset back to 0 if the user clicks OK on the popup window. I do not get any errors, however, the timer does not get reset and the site will always timeout.
I would also like to have both of the timers reset on key and mouse use. Below is code we have in place for the JavaScript timeout we currently have in production.
I am having problems getting a rad window to reset a timer on the parent page. Below is the code I have in place.
-- The below code is on the Parent Page
<radA:RadAjaxPanel ID="RadAjaxPanel" runat="server" Height="1px" Width="1px"> |
<radA:RadAjaxTimer ID="radTimer1" runat="server" AutoStart="False" /> |
<radA:RadAjaxTimer ID="radTimer2" runat="server" AutoStart="False" /> |
</radA:RadAjaxPanel> |
<radW:RadWindowManager ID="TimeoutWarningPopup" |
runat="server" |
VisibleOnPageLoad="false" |
Width="320" |
Behavior="close,move" |
ReloadOnShow="false" |
skin="Web20"> |
</radW:RadWindowManager> |
function StartTimer() |
{ |
<%=radTimer2.ClientID %>.Stop(); |
<%=radTimer2.ClientID %>.Start(); |
} |
-- This code is on the Rad Window and is called by the OnClick() of a standard HTML button
function GetRadWindow() |
{ |
var oWindow = null; |
if (window.radWindow) oWindow = window.radWindow; |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; |
return oWindow; |
} |
function CloseWindow() |
{ |
var oWindow = GetRadWindow(); |
oWindow.BrowserWindow.StartTimer(); |
oWindow.Close(); |
} |
This code is to create an application timeout / warning feature using code based on this post: http://www.telerik.com/community/forums/aspnet/window/automatic-logout-using-rad-window-and-rad-ajaxtimer.aspx
Basically, the radwindow is opened by the the radTimer1 (this piece works fine). When radTimer2 hits, the site is sent to a timout page. What I need to happen is for radTimer2 to be reset back to 0 if the user clicks OK on the popup window. I do not get any errors, however, the timer does not get reset and the site will always timeout.
I would also like to have both of the timers reset on key and mouse use. Below is code we have in place for the JavaScript timeout we currently have in production.
window.focus(); |
window.captureEvents(Event.KEYPRESS); |
window.captureEvents(Event.MOUSEDOWN); |
window.onkeypress = resetTimer; |
window.onmousedown = resetTimer; |