Guten Morgen!
Ja, ich rufe die Session.htm als Einstiegsseite auf und dort verweise ich auf meine Index.htm. Er tut auch so, als würde er die Session beenden, wenn ich das Fenster schliesse. Guckst du hier
:
<%@page language="abap" %>
<% " Copy this page into your BSP application, and change line below.
" This page should always used be as entry point into application.
DATA: target_page TYPE STRING VALUE 'index.htm'.
" Comment: In ie, when the browser is closed, the new popup window is
" still executed, before complete shutdown. This allows us to still close
" the session in the backend. With NN, when the browser is closed, it
" is gone for ever. So no session cleanup. This is feature/bug of one
" browser or the other browser.
%>
<html>
<script language="JavaScript">
function Loader(name)
{
doc=window.frames[name].document;
doc.writeln('<html><body onLoad="JavaScript:document.f.submit();">');
doc.writeln('<form id="f" name="f" target="SAP_BASIS_A" method="POST" action="<%=target_page%>">');
<% DATA: ffs TYPE tihttpnvp, ff TYPE ihttpnvp.
request->get_form_fields( changing fields = ffs ).
DELETE ffs WHERE name cs '~'.
LOOP AT ffs INTO ff.
%>
doc.writeln('<input type="hidden" name="<%=ff-name%>" value="<%=ff-value%>">');
<% ENDLOOP. %>
doc.writeln('<table border="0" width="100%" height="100%"><tr><td align="CENTER" valign="MIDDLE"><span style="font-family:Arial,sans-serif;"><otr>Loading...</otr></span></td></tr></table>');
doc.writeln('</form></body></html>');
doc.close();
<% if runtime->session_manager->is_enabled is not initial. %>
var liBehindFirstDot = location.hostname.indexOf( "." ) + 1;
if ( liBehindFirstDot > 0) document.domain = location.hostname.substr( liBehindFirstDot );
<% endif. %>
}
function exitBSPApplication(newTargetUrl)
{
<% if runtime->session_manager->is_running = 0. %>
<% CLASS cl_bsp_login_application DEFINITION LOAD. %>
var url = "<%=CL_BSP_LOGIN_APPLICATION=>GET_SESSIONEXIT_URL( page = page )%>";
var prop = 'height=100,width=400,top='+(screen.height-100)/2+',left='+(screen.width-400)/2;
var out = window.open(url,'_blank',prop);
<% endif. %>
document.getElementById("SAP_BASIS_FRAMESET").onunload = null;
if(newTargetUrl) window.setTimeout('{document.location.href="'+newTargetUrl+'";}', 750);
}
function frameLoaded(name)
{
}
</script>
<frameset id="SAP_BASIS_FRAMESET" rows="*,0" onUnLoad="exitBSPApplication();" resize="no" framespacing="0" frameborder="0">
<frame name="SAP_BASIS_A" src="JavaScript:parent.Loader('SAP_BASIS_A');" onLoad="JavaScript:frameLoaded('SAP_BASIS_A');" >
<noframes>This browser does not support frames.</noframes>
</frameset>
</html>