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
Get session Id from the browser current tab
Moderator: jeanmichel
Get session Id from the browser current tab
- Attachments
-
- Capture d’écran 2025-07-10 115417.png (6.56 KiB) Viewed 22558 times
Re: Get session Id from the browser current tab
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();
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
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)
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)