Localhost IP address

Hello,

i would like to know, is there any chance to get client localhost IP using javascript code. For example, if i have the configuration like shown below, i would like to get IP: 192.168.10.79

---
Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.10.79
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.10.254
---

All i've found on the I-NET was this snippet of code:
<SCRIPT>
var ip = new java.net.InetAddress.getLocalHost();
var ipStr = new java.lang.String(ip);
document.writeln(ipStr.substring(ipStr.indexOf("/")+1));
</SCRIPT>

(shame, that this works only on Mozilla, Netscape with Java). Well, is there any other way to get this IP for most browsers (IE, NN, Mozilla, etc.)?

Thanks.
fr0xAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dsackerContract ERP Admin/ConsultantCommented:
You cannot get the IP using javascript, although you can using most server-side languages (ASP, PHP, Java, etc).
dorwardCommented:
JavaScript can't know the IP address of the machine its running on, even if it could - which should it use? I think I one had as many as seven seperate IP addresses on the machine I'm currently working on - none of which were visible publically.

As dsacker said, you can use various server side methods to get the IP address the request game from (and then you can generate JavaScript from your server side code so you can get that information into JavaScript), but that IP address might well be that of a proxy server or gateway rather then anything the client actually knows about (it might even be one of a series of rotating proxies).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
superm401Commented:
the localhost ip is the ip that the computer referes to itself using.  It is always. 127.0.0.1.
fr0xAuthor Commented:
Well, i know all this, but i hoped there is some way to get this IP. Thanks for your help.

P.S. I hope, Administrator will close this thread soon.
dsackerContract ERP Admin/ConsultantCommented:
You can close it. Simply click "Accept" on whose answer you want to accept.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.