Hi,
Had created Timeout app in apex.oracle.com
Workspace = ez
Login = 123456
Password = 123456
App ID = 19765
Basically able to timeout if no activity is detected( Key strokes when input data ) within 10 seconds,
using the below javascript in HTML Header:
<script language="JavaScript" type="text/javascript">
<!--
var timeLength=10000
function stopCount()
{
clearTimeout($x('P1_TIMEOUT_ID').value)
startCount()
}
function startCount()
{
$x('P1_TIMEOUT_ID').value=setTimeout( 'doLogout();', timeLength )
}
function doLogout()
{
$x('P1_TIMEOUT_ID').value=0
doSubmit('TIMEOUT');
}
//-->
</script>
and Page Item P1_TIMEOUT_ID and a branch which logout user when executing
doSubmit('TIMEOUT');
All page items under Element, HTML Form Element Attributes set to onKeyup="stopCount()";
( does not work for Select List, guess will not work for LOV, Check Box too )
Questions:
1. How to enable Select List, Check Box, LOV to call function stopCount() ?
2. How to detect user's activity which could be simply moving mouse, up/down arrows
keys or any keys outside of Apex's item like Text Field, LOV, etc ?
3. Guess to make it work, had to set P1_TIMEOUT_ID item, javascript and the branch in
Page Zero to make it accessible to all pages in application and all pages' items need to have
HTML Form Element Attributes set to onKeyup="stopCount()"; , right ?
4. Is there more elegant way to do the above ?
Was quite surprised no complete example was available, just piece together relevant forum tips and lots of js reading.
Thanks in advance
Zack