2007 Jul 31 8:47 AM
HI All,
We use Internet Service CATW that runs on the ITS to display a timesheet for reporting time. This is accessed from the SAP Enterprise Portal.
After filling the timesheet the user clicks on the browser close (X) button and closes the browser, but with this the session does not gets killed and the user gets locked in the backend.
I have been able to capture the browser close (X) button for I.E 6 , I.E 7 (With Tabs) and kill the session with setOkCode("/nex');
Now here starts my problem. In Mozilla Firefox, there are tabs and when the user closes the tab, the setOkCode("/nex'); does not get executed in Java Script.
So Ive done a workaround. I have created a new template, on the click of the close (X) button on a tab, I can call the new HTML template that I created but the new page that opens up also does not execute setokcode('/nex').
this is the HTML TEMPLATE -> loggoff
`include (~service="catw", ~theme="99", ~name="functions_1000.html");`
<html>
<head>
<!-- <title>`#windowtitle`</title> -->
`SAP_TemplateStylesheet()`
`SAP_TemplateJavaScript()`
<SCRIPT LANGUAGE=JavaScript>
function closeSession(){
alert('inside new');
setOkCode('/nex');
alert('killed session');
}
</script>
</head>
<body `SAP_TemplateBodyAttributes( )`
onload="`SAP_TemplateOnLoadJavaScript()`;closeSession()" >
<!-- add content here -->
im in body
</body>
`SAP_TemplatePostProcess();`
</html>
Once the JavaScript method closeSession is called, it executes alert('inside new'); but after that it does notthing.
Please suggest if I need to add anything more to get setOkCode('/nex'); executed in this new HTML TEMPLATE..
Regards
Saurabh
HI All,
We use Internet Service CATW that runs on the ITS to display a timesheet for reporting time. This is accessed from the SAP Enterprise Portal.
After filling the timesheet the user clicks on the browser close (X) button and closes the browser, but with this the session does not gets killed and the user gets locked in the backend.
I have been able to capture the browser close (X) button for I.E 6 , I.E 7 (With Tabs) and kill the session with setOkCode("/nex');
Now here starts my problem. In Mozilla Firefox, there are tabs and when the user closes the tab, the setOkCode("/nex'); does not get executed in Java Script.
So Ive done a workaround. I have created a new template, on the click of the close (X) button on a tab, I can call the new HTML template that I created but the new page that opens up also does not execute setokcode('/nex').
this is the HTML TEMPLATE -> loggoff
`include (~service="catw", ~theme="99", ~name="functions_1000.html");`
<html>
<head>
<!-- <title>`#windowtitle`</title> -->
`SAP_TemplateStylesheet()`
`SAP_TemplateJavaScript()`
<SCRIPT LANGUAGE=JavaScript>
function closeSession(){
alert('inside new');
setOkCode('/nex');
alert('killed session');
}
</script>
</head>
<body `SAP_TemplateBodyAttributes( )`
onload="`SAP_TemplateOnLoadJavaScript()`;closeSession()" >
<!-- add content here -->
im in body
</body>
`SAP_TemplatePostProcess();`
</html>
Once the JavaScript method closeSession is called, it executes alert('inside new'); but after that it does notthing.
Please suggest if I need to add anything more to get setOkCode('/nex'); executed in this new HTML TEMPLATE..
Regards
Saurabh
2007 Jul 31 1:36 PM
2007 Jul 31 3:39 PM
Hi Karthikeyan,
Thats me, I was wondering if I could find some help after that in the ABAP forum,
Thanks anyways for going through the post )
Regards
Saurabh