Get Computer Name

Soldato
Joined
11 Feb 2004
Posts
4,532
Location
Surrey, UK
Is there a way in which I can easily obtain computer name using Javascript?
All computers are on the same domain.
I tried:

{
window.onerror=null;

host=addr.getHostName();
ip=addr.getHostAddress();
alert("Your host name is '" + host + "'\nYour IP address is " + ip);
}



which didn't return any values - in fact the alert didn't even pop up!
 
I do not think it is possible with just JavaScript. You will need the help of ActiveX or similar to get this kind of information.

TrUz
 
Back
Top Bottom