Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Java Script to get AD DisplayName inserted into html page

Status
Not open for further replies.

cjoyce1980

IS-IT--Management
Nov 30, 2007
3
GB
I'm trying to create a standard email disclaimer, but one that i can deploy to alot of users.

I've got the following, but i just need to get the displayname of the user out of AD.

Any clues?

<HTML>
<HEAD>
<script language=javascript>
<!--
var wshshell = new ActiveXObject("wscript.shell");
var username = wshshell.ExpandEnvironmentStrings("%username%");
var displayName =
var hostname = "hostname";
var linktext = username + "@" + hostname;
document.write(displayName + "<br>")
document.write("<a href=" + "mail" + "tox" + username + "@" + hostname + ">" + linktext + "</a>")
-->
</script>
</HEAD>
</HTML>
 
The code does not get the DisplayName out of AD (i.e. James Brown).

When this code runs, I would like it to fetch the DisplayName of the user out of AD and insert it into the HTML document.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top