I'm trying to find a good way to grab ip addresses from users. I've found many javascripts to put into the header of my pages, however, they all give me errors in webspeed. for example:
<SCRIPT language = javascript>var ip = new java.net.InetAddress.getLocalHost();var ipStr = new java.lang.String(ip);document.writeln(ipStr.substring(ipStr.indexOf("/")+1));</SCRIPT>
when i use that, it compiles fine, but when I try to run the page, I get a javascript error 'java' is undefined.
or when I try this code:
<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>
this won't even compile, it will give me an error saying "Unknown Field or Variable Name '!--#echo' "
anyone have any ideas? Thanks!
*and yes, i've been using the {&OUT} / ~n'. tags in webspeed
<SCRIPT language = javascript>var ip = new java.net.InetAddress.getLocalHost();var ipStr = new java.lang.String(ip);document.writeln(ipStr.substring(ipStr.indexOf("/")+1));</SCRIPT>
when i use that, it compiles fine, but when I try to run the page, I get a javascript error 'java' is undefined.
or when I try this code:
<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>
this won't even compile, it will give me an error saying "Unknown Field or Variable Name '!--#echo' "
anyone have any ideas? Thanks!
*and yes, i've been using the {&OUT} / ~n'. tags in webspeed