Get session Id from the browser current tab

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
Franck.A
Posts: 19
Joined: 06 Nov 2020, 19:33

Get session Id from the browser current tab

Post by Franck.A »

Hi everybody,

I need to get the current session Id which is displayed in the browser tab.
Is there any Axes command that can achieve this ?

Thx in advance to the Axes community
Attachments
Capture d’écran 2025-07-10 115417.png
Capture d’écran 2025-07-10 115417.png (6.56 KiB) Viewed 22557 times
Franck.A
Posts: 19
Joined: 06 Nov 2020, 19:33

Re: Get session Id from the browser current tab

Post by Franck.A »

I just found a workaround using javascript, but if anyone finds the Axes command he will be welcome :

let texte = document.title;
let morceaux = texte.split(" - ");
let IdSession = morceaux[1].trim();
Fairdinkum
Posts: 128
Joined: 24 Jul 2017, 17:02

Re: Get session Id from the browser current tab

Post by Fairdinkum »

FYI:

You can also use the following codes.

var dn = ""; // device name
if (AXES.isTS2Engine) dn = AXES.Terminal.deviceName;
else dn = DeviceName;
window.alert("Device = " + dn);

var un = ""; // user name
if (AXES.isTS2Engine) un = AXES.Terminal.jobUser;
else un = tsLoginName;
window.alert("User = " + un);

var jn = ""; // job number
if (AXES.isTS2Engine) jn = AXES.Terminal.jobNum;
else jn = JobNum;
window.alert("JobNumber = " + jn);

Hope this helps.

Regards,
Hide (from Fairdinkum)
Post Reply