var objUserInfo = new ActiveXObject("WScript.network"); Quickly customize your community to find the content you seek. spelling and grammar. The websocket communication is async. Hide elements in HTML using display property, CSS to put icon inside an input element in a form. To perform a DNS lookup from hostname to IP address using client-side JavaScript, we can use a 3rd . You can get hostname from URL in javascript. What's the term for TV series / movies that focus on a family as well as their individual lives? "computername" would only work on Windows, I think. Copy. The general consensus there is that it can't be done with Javascript. Note: Sometimes, it will not work on Google Chrome and Internet Explorer for the default setting. Indefinite article before noun starting with "the", Make "quantile" classification with an expression. Request.UserHostAddress property returns the remote User IP address, I also used it & it working fine. You can't get the client IP from server code or javascript. if its specific system i'm afraid you pretty much are at a dead end unless you run a client program. $zHostName$ (or whatever you name the field) = $PROCESS$ %COMSPEC% /c echo %COMPUTERNAME% For the IP you can do: $zLocalIP$ (or whatever you name the field) = $PROCESS$ %COMSPEC% /c ipconfig You will have to parse out the IP from the result Regards, Aditya K Upvote Reply Rolf Cooke 15 years ago For the best possible experience,please disable your Ad Blocker. javascript get hostname of client. So write a WebMethod which will retrieve the IP Address from the Request object and return it to caller. Get the client IP code: Method 2 (all platforms and browsers): How to check whether a string contains a substring in JavaScript? Dim host As System.Net.IPHostEntry, In PAGE LOAD EVENT get the Machine Name To subscribe to this RSS feed, copy and paste this URL into your RSS reader. In the case of HTTP, there are two hosts: client and server. Edit: note, if you can it would be better (less HTTP requests) and easier to just include the host name in a dynamically generated