PDA

View Full Version : textbox value from script??


ztheged
09-14-2002, 07:32 PM
Hi all!

I have a code that displays the user's IP address:

<%
'Code By Thomas Currie
'Thomas Currie Consulting Ltd
showip=request.servervariables("remote_addr")
Response.Write (showip)
%>

How can I make the IP address value appear inside a form's textbox??? :rolleyes:
The form is in a asp page, and I have tried it several ways. Perhaps with the value="..." field? But what variable should be called??

Thanks for the help :)

dfrancis
09-15-2002, 03:08 PM
Using your script... like this.

<input type= "text" size= "20" name= "IP_Address" value= " <%=showip%> " >

A quicker way would be like this...

<input type= "text" size= "20" name= "IP_Address" value= " <%=Request.ServerVariables("REMOTE_ADDR") %> " >