cjoyce1980 Posted November 30, 2007 Share Posted November 30, 2007 I'm trying to use Java Script to get AD Usernames insert into html page so far i've got this point, and i'm able to insert the text, but i not able to get auything from AD. can anyone help?<HTML> <HEAD> <script language=javascript> <!-- var username = "UserName"; var hostname = "DomainName"; var linktext = username + "@" + hostname; document.write("<a href=" + "mail" + "tox" + username + "@" + hostname + ">" + linktext + "</a>") --> </script> </HEAD></HTML> Link to comment Share on other sites More sharing options...
cjoyce1980 Posted November 30, 2007 Author Share Posted November 30, 2007 I'm getting there, but now i need to get the displayname (or first and last name) from AD and i'll having no joy as i do not know the syntax for this.any help please?<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> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now