Help: Getting GetUserName from a client-sided script? 
Author Message
 Help: Getting GetUserName from a client-sided script?

Has anyone had experience getting the NT user name (User ID) from within a
client-sided session.  We are using IE4.02.


TIA



Sat, 17 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
The Wscipt.Network object has a UserName property:

        Set net = CreateObject("Wscript.Network")
        user = net.UserName

Jeff


Quote:
> Has anyone had experience getting the NT user name (User ID) from within a
> client-sided session.  We are using IE4.02.



Sun, 18 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
"Wscript.Network" isn't marked safe for scripting so this may not work at
all if the user doesn't at least allow it with prompting.  You would
probably be better of getting it from the http headers on the server-side
and embedding it in the html page returned as a global client-side script
variable (var username = "John Smith") or in a hidden textbox.

--
Michael Harris


The Wscipt.Network object has a UserName property:

        Set net = CreateObject("Wscript.Network")
        user = net.UserName

Jeff


Quote:
> Has anyone had experience getting the NT user name (User ID) from within a
> client-sided session.  We are using IE4.02.



Sun, 18 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Hi,
Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
Dan


Quote:
>How would you get the http header?

>On Wed, 2 Jun 1999 09:14:33 -0700, "Michael Harris"

>>"Wscript.Network" isn't marked safe for scripting so this may not work at
>>all if the user doesn't at least allow it with prompting.  You would
>>probably be better of getting it from the http headers on the server-side
>>and embedding it in the html page returned as a global client-side script
>>variable (var username = "John Smith") or in a hidden textbox.

>>--
>>Michael Harris



>>The Wscipt.Network object has a UserName property:

>>        Set net = CreateObject("Wscript.Network")
>>        user = net.UserName

>>Jeff



>>> Has anyone had experience getting the NT user name (User ID) from within
a
>>> client-sided session.  We are using IE4.02.



Sun, 18 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
How would you get the http header?

On Wed, 2 Jun 1999 09:14:33 -0700, "Michael Harris"

Quote:

>"Wscript.Network" isn't marked safe for scripting so this may not work at
>all if the user doesn't at least allow it with prompting.  You would
>probably be better of getting it from the http headers on the server-side
>and embedding it in the html page returned as a global client-side script
>variable (var username = "John Smith") or in a hidden textbox.

>--
>Michael Harris



>The Wscipt.Network object has a UserName property:

>        Set net = CreateObject("Wscript.Network")
>        user = net.UserName

>Jeff



>> Has anyone had experience getting the NT user name (User ID) from within a
>> client-sided session.  We are using IE4.02.



Mon, 19 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
I saw this thread and it was exactly what I needed but
one question how do I store:
request.servervariables("REMOTE_USER") into a Variable?
My web page as follows works fine if I replace each
occurance of the var Info with the request.server... above
I hope to pass the username and domain to a class in the
VJ++6 cab file in the asp.

<HTML>
<HEAD><title>DaysOff_JDBC</title><HEAD>

<BODY BGCOLOR=#FFFFFF>
<FONT SIZE=4> Hello </FONT>
Info = request.servervariables("REMOTE_USER")
<FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
<FONT SIZE=4> From Domain: </FONT>
<FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
<BR>
<BR>
</BODY>

<p>
<APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
 CODE="DaysOff.class">
    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
</APPLET>

</HTML>



Quote:
> Hi,
> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
> Dan

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 20 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
I saw this thread and it was exactly what I needed but
one question how do I store:
request.servervariables("REMOTE_USER") into a Variable?
My web page as follows works fine if I replace each
occurance of the var Info with the request.server... above
I hope to pass the username and domain to a class in the
VJ++6 cab file in the asp.

<HTML>
<HEAD><title>DaysOff_JDBC</title><HEAD>

<BODY BGCOLOR=#FFFFFF>
<FONT SIZE=4> Hello </FONT>
Info = request.servervariables("REMOTE_USER")
<FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
<FONT SIZE=4> From Domain: </FONT>
<FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
<BR>
<BR>
</BODY>

<p>
<APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
 CODE="DaysOff.class">
    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
</APPLET>

</HTML>



Quote:
> Hi,
> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
> Dan

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 20 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Hi,
Just enclose the line to set the variable info as follows:
<% Info = request.servervariables("REMOTE_USER") %>
HTH,
Dan


Quote:
>I saw this thread and it was exactly what I needed but
>one question how do I store:
>request.servervariables("REMOTE_USER") into a Variable?
>My web page as follows works fine if I replace each
>occurance of the var Info with the request.server... above
>I hope to pass the username and domain to a class in the
>VJ++6 cab file in the asp.

><HTML>
><HEAD><title>DaysOff_JDBC</title><HEAD>

><BODY BGCOLOR=#FFFFFF>
><FONT SIZE=4> Hello </FONT>
>Info = request.servervariables("REMOTE_USER")
><FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
><FONT SIZE=4> From Domain: </FONT>
><FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
><BR>
><BR>
></BODY>

><p>
><APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
> CODE="DaysOff.class">
>    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
></APPLET>

></HTML>



>> Hi,
>> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
>> Dan

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.



Tue, 20 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Hi,
I'm new in scripting, and my question is
from which object is (request.servervariables("REMOTE_USER")) set ?

Best Regards
PIERRE

-----Message d'origine-----


Publi : vendredi 4 juin 1999 22:43
Publi dans: microsoft.public.scripting.VBScript
Conversation: Help: Getting GetUserName from a client-sided script?
Objet: Re: Help: Getting GetUserName from a client-sided script?

I saw this thread and it was exactly what I needed but
one question how do I store:
request.servervariables("REMOTE_USER") into a Variable?
My web page as follows works fine if I replace each
occurance of the var Info with the request.server... above
I hope to pass the username and domain to a class in the
VJ++6 cab file in the asp.

<HTML>
<HEAD><title>DaysOff_JDBC</title><HEAD>

<BODY BGCOLOR=#FFFFFF>
<FONT SIZE=4> Hello </FONT>
Info = request.servervariables("REMOTE_USER")
<FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
<FONT SIZE=4> From Domain: </FONT>
<FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
<BR>
<BR>
</BODY>

<p>
<APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
 CODE="DaysOff.class">
    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
</APPLET>

</HTML>



Quote:
> Hi,
> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
> Dan

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Wed, 21 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Hi Pierre,
Active Server Pages (ASP) has 4 objects in its object model: request,
response, application, session and server. Servervariables is a collection
in the request object.
HTH,
Dan
Quote:

>Hi,
>I'm new in scripting, and my question is
>from which object is (request.servervariables("REMOTE_USER")) set ?

>Best Regards
>PIERRE

>-----Message d'origine-----


>Publi : vendredi 4 juin 1999 22:43
>Publi dans: microsoft.public.scripting.vbscript
>Conversation: Help: Getting GetUserName from a client-sided script?
>Objet: Re: Help: Getting GetUserName from a client-sided script?

>I saw this thread and it was exactly what I needed but
>one question how do I store:
>request.servervariables("REMOTE_USER") into a Variable?
>My web page as follows works fine if I replace each
>occurance of the var Info with the request.server... above
>I hope to pass the username and domain to a class in the
>VJ++6 cab file in the asp.

><HTML>
><HEAD><title>DaysOff_JDBC</title><HEAD>

><BODY BGCOLOR=#FFFFFF>
><FONT SIZE=4> Hello </FONT>
>Info = request.servervariables("REMOTE_USER")
><FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
><FONT SIZE=4> From Domain: </FONT>
><FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
><BR>
><BR>
></BODY>

><p>
><APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
> CODE="DaysOff.class">
>    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
></APPLET>

></HTML>



>> Hi,
>> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
>> Dan

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.



Wed, 21 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
It actually come in the http headers sent by the browser to the server.
It's only available if your site requires authentication (Basic or NTLM) and
disallows anonymous.

--
Michael Harris


| Hi,
| I'm new in scripting, and my question is
| from which object is (request.servervariables("REMOTE_USER")) set ?
|
| Best Regards
| PIERRE
|
| -----Message d'origine-----


| Publi : vendredi 4 juin 1999 22:43
| Publi dans: microsoft.public.scripting.vbscript
| Conversation: Help: Getting GetUserName from a client-sided script?
| Objet: Re: Help: Getting GetUserName from a client-sided script?
|
|
| I saw this thread and it was exactly what I needed but
| one question how do I store:
| request.servervariables("REMOTE_USER") into a Variable?
| My web page as follows works fine if I replace each
| occurance of the var Info with the request.server... above
| I hope to pass the username and domain to a class in the
| VJ++6 cab file in the asp.
|
|
| <HTML>
| <HEAD><title>DaysOff_JDBC</title><HEAD>
|
| <BODY BGCOLOR=#FFFFFF>
| <FONT SIZE=4> Hello </FONT>
| Info = request.servervariables("REMOTE_USER")
| <FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
| <FONT SIZE=4> From Domain: </FONT>
| <FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
| <BR>
| <BR>
| </BODY>
|
| <p>
| <APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
|  CODE="DaysOff.class">
|     <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
| </APPLET>
|
| </HTML>
|
|
|


| > Hi,
| > Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
| > Dan
| >
|
|
|
| Sent via Deja.com http://www.deja.com/
| Share what you know. Learn what you don't.
|



Wed, 21 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Hi,
I meant to type 5 objects-the fingers move quicker than the brain sometimes
:-)
Dan
Quote:

>Hi Pierre,
>Active Server Pages (ASP) has 4 objects in its object model: request,
>response, application, session and server. Servervariables is a collection
>in the request object.
>HTH,
>Dan


>>Hi,
>>I'm new in scripting, and my question is
>>from which object is (request.servervariables("REMOTE_USER")) set ?

>>Best Regards
>>PIERRE

>>-----Message d'origine-----


>>Publi : vendredi 4 juin 1999 22:43
>>Publi dans: microsoft.public.scripting.vbscript
>>Conversation: Help: Getting GetUserName from a client-sided script?
>>Objet: Re: Help: Getting GetUserName from a client-sided script?

>>I saw this thread and it was exactly what I needed but
>>one question how do I store:
>>request.servervariables("REMOTE_USER") into a Variable?
>>My web page as follows works fine if I replace each
>>occurance of the var Info with the request.server... above
>>I hope to pass the username and domain to a class in the
>>VJ++6 cab file in the asp.

>><HTML>
>><HEAD><title>DaysOff_JDBC</title><HEAD>

>><BODY BGCOLOR=#FFFFFF>
>><FONT SIZE=4> Hello </FONT>
>>Info = request.servervariables("REMOTE_USER")
>><FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
>><FONT SIZE=4> From Domain: </FONT>
>><FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
>><BR>
>><BR>
>></BODY>

>><p>
>><APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
>> CODE="DaysOff.class">
>>    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
>></APPLET>

>></HTML>



>>> Hi,
>>> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
>>> Dan

>>Sent via Deja.com http://www.deja.com/
>>Share what you know. Learn what you don't.



Wed, 21 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
well I tried that and now it gives an error of

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'Info'

/daysoff/daysoff.asp, line 7

Any ideas?
the asp is below pline 7 is
<% User=mid(10,30,Info) %>

<HTML>
<HEAD><title>DaysOff_JDBC</title><HEAD>

<BODY BGCOLOR=#FFFFFF>
<FONT SIZE=4> Hello </FONT>
<% Info=request.servervariables("REMOTE_USER") %>
<% User=mid(10,30,Info) %>
<% Domain=left(Info,8) %>
<FONT SIZE=4> <% User %></FONT>
<FONT SIZE=4> From Domain: </FONT>
<FONT SIZE=4> <% Domain %></FONT><BR>
<BR>
<BR>
</BODY>
</HTML>



Quote:
> Hi,
> Just enclose the line to set the variable info as follows:
> <% Info = request.servervariables("REMOTE_USER") %>
> HTH,
> Dan



> >I saw this thread and it was exactly what I needed but
> >one question how do I store:
> >request.servervariables("REMOTE_USER") into a Variable?
> >My web page as follows works fine if I replace each
> >occurance of the var Info with the request.server... above
> >I hope to pass the username and domain to a class in the
> >VJ++6 cab file in the asp.

> ><HTML>
> ><HEAD><title>DaysOff_JDBC</title><HEAD>

> ><BODY BGCOLOR=#FFFFFF>
> ><FONT SIZE=4> Hello </FONT>
> >Info = request.servervariables("REMOTE_USER")
> ><FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
> ><FONT SIZE=4> From Domain: </FONT>
> ><FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
> ><BR>
> ><BR>
> ></BODY>

> ><p>
> ><APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
> > CODE="DaysOff.class">
> >    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
> ></APPLET>

> ></HTML>



> >> Hi,
> >> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
> >> Dan

> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Fri, 23 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Mid(string, start[, length])

--
Michael Harris


well I tried that and now it gives an error of

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'Info'

/daysoff/daysoff.asp, line 7

Any ideas?
the asp is below pline 7 is
<% User=mid(10,30,Info) %>

<HTML>
<HEAD><title>DaysOff_JDBC</title><HEAD>

<BODY BGCOLOR=#FFFFFF>
<FONT SIZE=4> Hello </FONT>
<% Info=request.servervariables("REMOTE_USER") %>
<% User=mid(10,30,Info) %>
<% Domain=left(Info,8) %>
<FONT SIZE=4> <% User %></FONT>
<FONT SIZE=4> From Domain: </FONT>
<FONT SIZE=4> <% Domain %></FONT><BR>
<BR>
<BR>
</BODY>
</HTML>



Quote:
> Hi,
> Just enclose the line to set the variable info as follows:
> <% Info = request.servervariables("REMOTE_USER") %>
> HTH,
> Dan



> >I saw this thread and it was exactly what I needed but
> >one question how do I store:
> >request.servervariables("REMOTE_USER") into a Variable?
> >My web page as follows works fine if I replace each
> >occurance of the var Info with the request.server... above
> >I hope to pass the username and domain to a class in the
> >VJ++6 cab file in the asp.

> ><HTML>
> ><HEAD><title>DaysOff_JDBC</title><HEAD>

> ><BODY BGCOLOR=#FFFFFF>
> ><FONT SIZE=4> Hello </FONT>
> >Info = request.servervariables("REMOTE_USER")
> ><FONT SIZE=4> <% = mid(10,30,Info) %></FONT>
> ><FONT SIZE=4> From Domain: </FONT>
> ><FONT SIZE=4> <% = left(Info,8) %></FONT><BR>
> ><BR>
> ><BR>
> ></BODY>

> ><p>
> ><APPLET NAME="DaysOff" WIDTH=600 HEIGHT=600
> > CODE="DaysOff.class">
> >    <PARAM NAME="CABBASE" VALUE="DaysOff_JDBC.CAB">
> ></APPLET>

> ></HTML>



> >> Hi,
> >> Use <%= request.servervariables("REMOTE_USER") %> in an ASP page.
> >> Dan

> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Fri, 23 Nov 2001 03:00:00 GMT  
 Help: Getting GetUserName from a client-sided script?
Ooops I dropped the ball on that one
thanks for the help



Quote:
> Mid(string, start[, length])

> --
> Michael Harris



> well I tried that and now it gives an error of

> Microsoft VBScript runtime error '800a000d'

> Type mismatch: 'Info'

> /daysoff/daysoff.asp, line 7

> Any ideas?
> the asp is below pline 7 is
> <% User=mid(10,30,Info) %>

> <HTML>
> <HEAD><title>DaysOff_JDBC</title><HEAD>

> <BODY BGCOLOR=#FFFFFF>
> <FONT SIZE=4> Hello </FONT>
> <% Info=request.servervariables("REMOTE_USER") %>
> <% User=mid(10,30,Info) %>
> <% Domain=left(Info,8) %>
> <FONT SIZE=4> <% User %></FONT>
> <FONT SIZE=4> From Domain: </FONT>
> <FONT SIZE=4> <% Domain %></FONT><BR>
> <BR>
> <BR>
> </BODY>
> </HTML>



> > Hi,
> > Just enclose the line to set the variable info as follows:
> > <% Info = request.servervariables("REMOTE_USER") %>
> > HTH,
> > Dan

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Tue, 27 Nov 2001 03:00:00 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. ASP referring to server side variables in client side script

2. Client side and Server side script working together

3. Help, please, on client side scripting

4. getting server side vbscript array to client side jscript

5. getting server variables to client side scripting

6. getting server side vbscript array to client side jscript

7. Getting Client's IP Address on Client Side

8. Client side scripting / server side scripting

9. Accessing Data generated with client-side script from server-side script

10. Calling Server Side Script from Client Side Script

11. Call Server Side Script From Client Side Script

12. Client side scripting / server side scripting

 

 
Powered by phpBB® Forum Software