The following issue occurs in Chrome 9.0.597.98 beta. I can't reproduce it in Firefox or IE. Here goes.
So, I have the following javascript running on every page in my web app:
Basically, it sets a timeout so that if a user is idle for to long, it will log them out. You'll notice that I'm using jQuery. I'm using the jQuery that comes packages with the Telerik controls. I'm using 2010.3.1317.40. The following is a simple page with a RadGrid on it:
So basically what is happening is that when I push the delete button next to a user, it is firing the onLogoutTimeout() javascript timeout. The confirm dialog comes up, on confirm the server side event gets fired, and then this timeout event gets fired, which logs a user out. Not sure why this is happening. Any help would be appreciated.
So, I have the following javascript running on every page in my web app:
var
TIMEOUT_DURATION = 1200000;
var
timerID =
null
;
function
onLogoutTimeout()
{
$(
"a"
).each(
function
()
{
var
isLogoutLink = jQuery(
this
).attr(
"id"
).toString().search(
new
RegExp(/signoutLink/i));
if
(isLogoutLink >= 0)
document.location =
this
.href;
});
}
function
onResetTimer()
{
clearTimeout(timerID);
timerID = setTimeout(
"onLogoutTimeout()"
, TIMEOUT_DURATION);
}
$(document).ready(
function
()
{
timerID = setTimeout(
"onLogoutTimeout()"
, TIMEOUT_DURATION);
$(
this
).mousemove(
function
(e) { onResetTimer() });
$(
this
).keydown(
function
(e) { onResetTimer() });
});
Basically, it sets a timeout so that if a user is idle for to long, it will log them out. You'll notice that I'm using jQuery. I'm using the jQuery that comes packages with the Telerik controls. I'm using 2010.3.1317.40. The following is a simple page with a RadGrid on it:
<%@ Page Title="" Language="C#" MasterPageFile="~/Includes/MasterPages/GofrPortalMasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Organization_Admin_Users_Default"
Culture="auto" UICulture="auto" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"Head"
runat
=
"Server"
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"PageTitle"
runat
=
"Server"
>
<
asp:Localize
runat
=
"server"
meta:resourcekey
=
"PageTitle"
></
asp:Localize
>
</
asp:Content
>
<
asp:Content
ID
=
"Content3"
ContentPlaceHolderID
=
"MainContent"
runat
=
"Server"
>
<
telerik:RadCodeBlock
ID
=
"rcbCodeBlock"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
if (typeof SubscribeToWindowClose == "function")
{
SubscribeToWindowClose("rwCreateUser", OnCreateUserWindowClose);
SubscribeToWindowClose("rwEditUser", OnCreateUserWindowClose);
}
function OnCreateUserWindowClose(args)
{
var userGridAjaxPanel = $find("<%= rapUserGrid.ClientID %>");
userGridAjaxPanel.ajaxRequest("Rebind");
}
</
script
>
</
telerik:RadCodeBlock
>
You can add users by clicking on the plus icon or modify them by clicking on their
email address.<
br
/>
<
br
/>
<
telerik:RadAjaxPanel
ID
=
"rapUserGrid"
runat
=
"server"
OnAjaxRequest
=
"OnUserGridAjaxRequest"
LoadingPanelID
=
"loadingPanel"
>
<
telerik:RadGrid
ID
=
"rgUser"
runat
=
"server"
EnableEmbeddedSkins
=
"False"
Skin
=
"GofrDefault"
GridLines
=
"None"
AutoGenerateColumns
=
"False"
OnItemDeleted
=
"OnItemDeleted"
OnNeedDataSource
=
"OnNeedUsersDataSource"
OnDeleteCommand
=
"OnDeleteUser"
AllowSorting
=
"true"
>
<
MasterTableView
DataKeyNames
=
"AssetID"
CommandItemDisplay
=
"Top"
meta:resourcekey
=
"GridMasterTableView"
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
ConfirmText
=
"Are you sure you want to delete this user?"
ConfirmTitle
=
"Confirm Delete"
UniqueName
=
"DeleteColumn"
CommandName
=
"Delete"
ImageUrl
=
"~/Skins/GofrDefault/Grid/Delete.gif"
ItemStyle-Width
=
"1em"
meta:resourcekey
=
"UserGridDeleteColumn"
>
</
telerik:GridButtonColumn
>
<
telerik:GridHyperLinkColumn
HeaderText
=
"Email Address"
SortExpression
=
"EmailAddress"
ItemStyle-Width
=
"30em"
DataTextField
=
"EmailAddress"
DataNavigateUrlFields
=
"AssetID"
DataNavigateUrlFormatString
=
"javascript:OpenRadWindow_NoReturn('rwEditUser', {{'UserID':{0}}})"
meta:resourcekey
=
"UserGridEmailColumn"
>
</
telerik:GridHyperLinkColumn
>
<
telerik:GridBoundColumn
DataField
=
"FirstName"
HeaderText
=
"First Name"
SortExpression
=
"FirstName"
meta:resourcekey
=
"UserGridFirstNameColumn"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"LastName"
HeaderText
=
"Last Name"
SortExpression
=
"LastName"
meta:resourcekey
=
"UserGridLastNameColumn"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
CommandItemTemplate
>
<
div
class
=
"gridCommandItemDiv"
>
<
asp:HyperLink
runat
=
"server"
CssClass
=
"gridCommandItem"
Text="<%$ Resources:VirtualOfficeResources, CreateUserLabel %>"
NavigateUrl="javascript:OpenRadWindow_NoReturn('rwCreateUser', null, null)" ImageUrl="~/Skins/GofrDefault/Grid/AddRecord.gif"
ToolTip="Create User"></
asp:HyperLink
>
</
div
>
</
CommandItemTemplate
>
</
MasterTableView
>
<
FilterMenu
EnableEmbeddedSkins
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
EnableEmbeddedSkins
=
"False"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
</
telerik:RadAjaxPanel
>
<
telerik:RadAjaxLoadingPanel
ID
=
"loadingPanel"
runat
=
"server"
Transparency
=
"0"
IsSticky
=
"true"
>
<
asp:Panel
ID
=
"innerLoadingPanel"
runat
=
"server"
CssClass
=
"innerLoadingPanel"
>
<
table
>
<
tr
>
<
td
>
<
asp:Image
runat
=
"server"
ImageUrl
=
"~/Skins/GofrDefault/Common/loading.gif"
/>
</
td
>
<
td
style
=
"color: White; padding-left: 1em; font-size: larger"
>
<
asp:Localize
runat
=
"server"
Text="<%$ Resources:VirtualOfficeResources, LoadingLabel %>"></
asp:Localize
>
</
td
>
</
tr
>
</
table
>
</
asp:Panel
>
<
ajax:AlwaysVisibleControlExtender
runat
=
"server"
HorizontalSide
=
"Center"
VerticalSide
=
"Middle"
VerticalOffset
=
"150"
HorizontalOffset
=
"100"
TargetControlID
=
"innerLoadingPanel"
>
</
ajax:AlwaysVisibleControlExtender
>
</
telerik:RadAjaxLoadingPanel
>
</
asp:Content
>
So basically what is happening is that when I push the delete button next to a user, it is firing the onLogoutTimeout() javascript timeout. The confirm dialog comes up, on confirm the server side event gets fired, and then this timeout event gets fired, which logs a user out. Not sure why this is happening. Any help would be appreciated.