I am creating a classic ASP that will output form inputs to an XML file and one requirement for auditing purposes is to have the NT user name added, I am using the code below to obtain that but it comes out in the form of
myDomain\JBear however I would like it to come out as JBear.
Code: Select all
{
// Function to get user name currently logged into Workbench so their details can
//be added to the XML output
var strUser =Request.ServerVariables("LOGON_USER");
}
I have tried string manipulation but all I get is as error shown below where line 25 is the location of the string function:
Code: Select all
Microsoft JScript runtime error '800a138f'
Object expected
/workbook/workbench.asp, line 25
I would have added something like:
Any ideas?