We have written a code that shows the computer's name and IP in an php page for our local intranet so our User Services can ask the end users their computer name. It currently runs only in IE and only when the file is on the local computer.
<script type="text/javascript" language="javascript">
var cpu = new ActiveXObject("WScript.Network");
document.write("<h1 style=\"color:#ffc533\"> Your Computer's name is: " + cpu.ComputerName + "</h1>")
</script>
<h1>Your IP Address is: <?php print $_SERVER[REMOTE_ADDR] ?></h1>
When we test it on the computer both show but when we upload it to the server it displays only the IP Address. Working only in IE is not a problem, however, the local issue is. So my question is two fold. How can I get the computer name to display on the page or is there a better way to get it to work without having reverse DNS enabled?