Jump to content

Recommended Posts

Posted

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>


Posted

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>

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...