Javascript function not getting Windows username
Posted
by
Cocoa Dev
on Stack Overflow
See other posts from Stack Overflow
or by Cocoa Dev
Published on 2012-06-12T16:32:33Z
Indexed on
2012/06/12
16:40 UTC
Read the original article
Hit count: 234
function getWindowsUserName()
{
var WinNetwork = new ActiveXObject("WScript.Network");
var urlToSite = "http://localhost/index.php?nph-psf=0&HOSTID=AD&ALIAS=" & WinNetwork.username
document.getElementById(psyncLink).value = urlToSite;
}
I am trying to make the frame load the urlToSite
<frameset cols="300px, *">
<frame src="topo1.htm" name="topo" id="topo" application="yes" />
<frame src="http://localhost/index.php?nph-psf=0&HOSTID=AD&ALIAS=" name="psync" id="psyncLink" application="yes" />
</frameset>
© Stack Overflow or respective owner