cancel
Showing results for 
Search instead for 
Did you mean: 

user session alive after window closes

Former Member
0 Kudos

Hi all,

From an ITS service (service_1), I launched another transaction (another service, service_2)) in a new modal window. After finishing with the modal window operation, I close it by calling javascript

function f(value){

if (value != "") {

returnValue=value;

}

requestManager.requestFor("`URLwgate`/`service`/?~command=logoff");

window.close();

}

But this doesn't seem to teminate the user session running the transaction. I can still see it in SM04. Can someone give me some hint on how to terminate (logoff) the user session (service_2) when closing the window, either by "cancel" button or the cross icon (Close) on the browser window?

Thanks!

Jay

Accepted Solutions (1)

Accepted Solutions (1)

thorsten_domsalla
Active Participant
0 Kudos

Hello Jay,

so you use window.showModalDialog() to open the new window. Now, the question is, where do you execute the javascript for sending the ~command=logoff to close the session?

But, what exactly does

requestManager.requestFor("`URLwgate`/`service`/?~command=logoff");

do? This all is Javascript-code, right? There you can not use any HTML Business variables (those embedded by backticks).

Just try to send a relative URL

requestManager.requestFor("?~command=logoff");

Best regards,

TJ

Former Member
0 Kudos

Hello TJ,

I only want to log off the user session maintained by the modal window (service_2), not the user session by the parent window (service_1), so I had to specify the service name. And I also believe it is possible to put backticks into javascript codes within an HTML template. These would be resolved into plain HTML later. Do you have any other suggestions?

Thanks,

Jay

former_member316351
Active Contributor
0 Kudos

Hello Jay,

You should use a tool, like HTTP Watch or Fiddler, to see what is sent by your javascript coding.

Edgar

thorsten_domsalla
Active Participant
0 Kudos

Hi Jay,

>

> I only want to log off the user session maintained by the modal window (service_2), not the user session by the parent window (service_1), so I had to specify the service name. And I also believe it is possible to put backticks into javascript codes within an HTML template. These would be resolved into plain HTML later. Do you have any other suggestions?

that is no antilogy. If you send a GET or POST with a relative address the browser uses the current reference including the session for this request. Thus, there should be no need to add the service name.

But if you want to provide the ~wgateurl() and ~session, you will need to write them (on the server) in HTML Business to some Javascript variable in order to access these information later in Javascript (on the client/browser). Or you slice the webguiform's action/address to your needs to extract the corresponding data.

Best regards,

TJ

Answers (0)