IP address

A

Adam

Is there a good java script that shows the IP address of a user. I want an
IP address to show on a form page, so the user knows that there IP address is
being recorded. But I couldnt find any good scripts.
 
J

John Cello

Adam:

This script works if your server is running SSI.

Paste this into the body of your page:
<script language="javascript">

//IP address display: By http://www.Hostroute.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)

var ip = '<!--#echo var="REMOTE_ADDR"-->'

function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>

<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>

You'll need to rename your page with a .shtml extension.

Hope this helps

John Cello
www.johncelloconsulting.com
 
J

Jim Cheshire \(JIMCO\)

Adam said:
Is there a good java script that shows the IP address of a user. I
want an IP address to show on a form page, so the user knows that
there IP address is being recorded. But I couldnt find any good
scripts.

Keep in mind that most users today don't expose their IP address. If I were
to browse your site right now, it would show the IP address of the gateway
but not my IP address.

--
Jim Cheshire
JIMCO
Charity-ware Add-ins for FrontPage
http://www.jimcoaddins.com

Author of Special Edition Using Microsoft Office FrontPage 2003
 
J

Johnny Bravo

You can reach me here:

Todd Ullum
5963 Whitefield Street
Dearborn Heights, Michigan
48127
The diesel mechanic money is absolutely insane!!
 
D

Don Hale

Is there a way an email can be sent when a particular page is visited with
the IP address or domain name?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top