I found this interesting JavaScript code that can be used to reliably display
the user's IP, whether in a form box or elsewhere on the page, by saving the IP
in a variable. It requires that the page be Server Side Includes (SSI) enabled
for the actual IP detection portion to work
<script language="JavaScript">
//IP address display: By http://www.Host
// route.com
//Script featured on JavaScript Kit (htt
// p://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>
Here's a demo of the script:
http://www.javascriptkit.com/script/script2/displayip.shtml |