By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,363 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,363 IT Pros & Developers. It's quick & easy.

Display user's IP address when visiting internal site

P: n/a
Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
I'm a running a small intranet site off this machine which is
accessible by the end users by typing in the computer name of this
machine. What I need is a script of any kind that will allow me to
capture the end users internal IP address and display it on the status
bar of their IE window (Bottom left). Again, the only people accessing
this site are internal users and I want them to see what their IP
address is whenever they access the main page of the site. Is this
possible? Any help is appreciated.

-Jorge
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
JayPee wrote:
I'm running IIS on a Windows 2000 Proffessional PC.
I'm a running a small intranet site off this machine which is
accessible by the end users by typing in the computer name of this
machine. What I need is a script of any kind that will allow me to
capture the end users internal IP address and display it on the status
bar of their IE window (Bottom left). Again, the only people accessing
this site are internal users and I want them to see what their IP
address is whenever they access the main page of the site. Is this
possible?


Assuming the main page is an ASP page (or can be made one) and tested
for 127.0.0.1 only, in the head section include:

<script type="text/javascript">
var sIpAddress = "<%= Request.ServerVariables("REMOTE_ADDR") %>";
window.defaultStatus = sIpAddress;
</script>
FWIW,
Dom


Jul 20 '05 #2

P: n/a
Check this out:
http://javascript.internet.com/user-...p-address.html

"JayPee" <jp*****@hotmail.com> wrote in message
news:a8**************************@posting.google.c om...
Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
I'm a running a small intranet site off this machine which is
accessible by the end users by typing in the computer name of this
machine. What I need is a script of any kind that will allow me to
capture the end users internal IP address and display it on the status
bar of their IE window (Bottom left). Again, the only people accessing
this site are internal users and I want them to see what their IP
address is whenever they access the main page of the site. Is this
possible? Any help is appreciated.

-Jorge

Jul 20 '05 #3

P: n/a
Hi there

[posting sequence restored]
"JayPee" <jp*****@hotmail.com> wrote in message
news:a8**************************@posting.google.c om...
Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
I'm a running a small intranet site off this machine which is
accessible by the end users by typing in the computer name of this
machine. What I need is a script of any kind that will allow me to
capture the end users internal IP address and display it on the status
bar of their IE window (Bottom left). Again, the only people accessing
this site are internal users and I want them to see what their IP
address is whenever they access the main page of the site. Is this
possible? Any help is appreciated.

-Jorge

esrkq wrote: Check this out:
http://javascript.internet.com/user-...p-address.html


Warning !!
Please Note !! This is really a server-side solution, similar to the
already-mentioned ASP solution. This solution only works if the SERVER
supports and implements server-side includes. This isn't really a
javascript solution, per se. (ie, it isn't *javascript* that is
detecting the IP number! (true also of the ASP solution) Plus, what's
displayed isn't really my machine's IP number anyway. But that probably
won't be an issue in the OP's scenario)

If you're using IIS, it's probably better to use the ASP version, IMO.
Regards,
Stephen

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.