Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to get the Client Host Name

Posted on 1999-07-05
Medium Priority
Last Modified: 2012-06-27
I am writing a Java Script to use as an automatica proxy configurator for MSIE 4.01. I want to know if there is a JavScript funtion to detect not only the IP adress for the host but also the full qualified host name, etc.
Question by:estevaf
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1288702
I assume you are referring to server-side JavaScript and not client-side JavaScript, correct?  There is no function on client-side to get the information you want.
LVL 75

Accepted Solution

Michel Plungjan earned 600 total points
ID: 1288703
TecBuilder is correct. However with a mixture of serverside and clientside you can...

if(typeof(HostName) == "undefined")        // Check for no server
   document.write("HostName is unknown");
document.write("You came from " +HostName + " ("+ IPAddr + ")");

Pharlab has more of those, and you can rewrite one yourself with nslookup...


Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question