PDA

View Full Version : Im a newbie help me please:)


neurosupherot
08-14-2003, 06:06 PM
i wanted to put these lines into my page(i picked up there:http://www.javascriptkit.com/script/script2/displayip.shtml):


<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>
my problem is that it doesn't work.
in the white box, instead of my ip adress, i have this:
'<!--#echo var="REMOTE_ADDR"-->'
can somebody help me? thanks

shlagish
08-14-2003, 06:12 PM
It doesn't work?

Put all of it between the <body> and </body> tags.

neurosupherot
08-14-2003, 06:18 PM
I tried to save the webpage who has this script but when i launch it from my computer, it write my ip in the source. then, i change this:'var ip = '81.238.60.94' by this
var ip = '<!--#echo var="REMOTE_ADDR"-->'(the original code)
the code is exactly between <body> and </body>