Forum Moderators: open
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="adp.aspx.vb" Inherits="adp2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="~/Styles/site.css" rel="stylesheet" type="text/css" />
<script language="javaScript" type="text/javascript">
<!--
//5 minutes = 300000 (1000 ms * 60 seconds * 5 minutes) 1 second = 1000miliseconds
var autoCloseTimer;
var timeoutObject;
var timePeriod = 10000; // 10 seconds
var warnPeriod = 5000; // 5 seconds
function promptForClose() {
autoCloseDiv.style.display = 'block';
autoCloseTimer = setTimeout("definitelyClose()", warnPeriod);
}
function autoClose() {
autoCloseDiv.style.display = 'block'; //shows message on page
autoCloseTimer = setTimeout("definitelyClose()", timePeriod); //starts countdown to closure
}
function cancelClose() {
clearTimeout(autoCloseTimer); //stops auto-close timer
autoCloseDiv.style.display = 'none'; //hides message
}
function resetTimeout() {
clearTimeout(timeoutObject); //stops timer
timeoutObject = setTimeout("promptForClose()", timePeriod); //restarts timer from 0
}
function definitelyClose() {
parent.Iframe0.location.href = "https://URLHERE.com/"
}
-->
</script>
</head>
<body onmousedown="resetTimeout();" onmouseup="resetTimeout();" onmousemove="resetTimeout();" onkeydown="resetTimeout();" onload="timeoutObject=setTimeout('promptForClose()',timePeriod);">
<form id="form1" runat="server">
<div class="page">
<div class="header" style="left: 0px; top: 0px">
<h1>
</h1>
</div>
<div class="clear hideSkiplink">
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode NavigateUrl="~/Default.aspx" Text="Home" Value="Home">
</asp:TreeNode>
</Nodes>
</asp:TreeView>
<br />
</div>
<div class="leftcolNon">
<div id='autoCloseDiv' style="display:none">
<center>
<p>
<strong>Inactivity warning!</strong><br />
This page will reset in 5 seconds unless you hit 'Cancel.'</p>
<input type='button' value='Reset' onclick='definitelyClose();' />
<input type='button' value='Cancel' onclick='cancelClose();' />
</center>
</div>
</div>
<div class="mainColNon">
<div class="iframeAdpSite">
<iframe id="Iframe0" frameborder="0" name="Iframe0" scrolling="auto" src="https://adp.eease.com/" style="width: 764px; height: 1000px">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>
</div>
<div class="rightcolNon">
</div>
<!-- </div> -->
<div class="clear">
</div>
<div class="footer">
</div>
</div>
</form>
</body>
</html>
window.onload=function() {
document.body.onmousemove=function() { resetTimeout(); }
timeoutObject=setTimeout('promptForClose()',timePeriod);
};
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="adp.aspx.vb" Inherits="adp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<%--<meta http-equiv="refresh" content="5; url=index.html" />--%>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="false" />
<title></title>
<link href="~/Styles/site.css" rel="stylesheet" type="text/css" />
<script type="text/VB" runat="server">
Public Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
' Stop Caching in IE
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
'Stop Caching in Firefox
Response.Cache.SetNoStore()
End Sub
</script>
<script type="text/javascript">
history.forward();
</script>
<script language="javaScript" type="text/javascript">
//5 minutes = 300000 (1000 ms * 60 seconds * 5 minutes) 1 second = 1000miliseconds
var autoCloseTimer;
var timeoutObject;
var timePeriod = 10000; // 10 seconds
var warnPeriod = 5000; // 5 seconds
onmouseover = resetTimeout();
function promptForClose() {
document.getElementById("autoCloseDiv").style.display = 'block';
autoCloseTimer = setTimeout("definitelyClose()", warnPeriod);
}
function autoClose() {
document.getElementById("autoCloseDiv").style.display = 'block'; //shows message on page
autoCloseTimer = setTimeout("definitelyClose()", timePeriod); //starts countdown to closure
}
function cancelClose() {
clearTimeout(autoCloseTimer); //stops auto-close timer
document.getElementById("autoCloseDiv").style.display = 'none'; //hides message
}
function resetTimeout() {
clearTimeout(timeoutObject); //stops timer
timeoutObject = setTimeout("promptForClose()", timePeriod); //restarts timer from 0
}
function definitelyClose() {
parent.Iframe0.location.href = "https://URLHERE/"
window.close()
self.close()
}
</script>
</head>
<body onmousedown="resetTimeout();" onmouseup="resetTimeout();" onmousemove="resetTimeout();" onkeydown="resetTimeout();" onload="timeoutObject=setTimeout(promptForClose, timePeriod);">
<form id="form1" runat="server">
<div class="page">
<div class="pageCover">
<div class="header">
<h1>
</h1>
</div>
<div class="clear hideSkiplink">
<asp:TreeView ID="TreeView1" runat="server">
<Nodes>
<asp:TreeNode NavigateUrl="~/Default.aspx" Text="Home" Value="Home">
</asp:TreeNode>
</Nodes>
</asp:TreeView>
<%--<a href="javascript:location.reload(true)">Refresh this page</a>--%>
<br />
</div>
<div class="leftcolNon">
<div id='autoCloseDiv' style="display:none">
<center>
<p>
<strong>Inactivity warning!</strong><br />
This page will reset in <strong>5 seconds</strong> unless you hit <strong>'Cancel.'</strong></p>
<input type='button' value='Reset' onclick='definitelyClose()' />
<input type='button' value='Cancel' onclick='cancelClose()' />
</center>
</div>
</div>
<div class="mainColNon">
<div class="iframeAdpSite">
<iframe id="Iframe0" frameborder="0" name="Iframe0" scrolling="auto" src="https://URLHERE/" style="width: 764px; height: 1000px">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>
</div>
<div class="rightcolNon">
</div>
<!-- </div> -->
<div class="clear">
</div>
<div class="footer">
</div>
</div>
</div>
</form>
</body>
</html>