|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Passing hidden fields to
Hi,
I'm trying to pass the city and country fields generated through this geobytes script via hidden fields on an asp form. Here's the example script : "<script language="Javascript" src="http://gd.geobytes.com/gd?after=-1&variables=GeobytesCountry,GeobytesCity"> </script> <script language="Javascript"> document.write("<p>Welcome to visitors from "+sGeobytesCity+", "+sGeobytesCountry); </script>" I would like to modify this script. How would I pass GeobytesCity & GeobytesCountry into hidden fields on a asp form submission ? Thanks for any help. |
|
#2
|
||||
|
||||
|
How to pass those values into hidden fields?
Change the url to something like this: gd.geobytes.com/gd?after=-1&GeobytesCountry=somevalue&GeobytesCity=somevalue In the ASP, grab those values and insert them into the hidden fields. <% Dim a, b a = Request.Querystring("geobytescountry") b = Request.Querystring("geobytescity") %> <input type="hidden" name="geobytescountry" value="<%=a%>"> <input type="hidden" name="geobytescity"" value="<%=b%>"> Last edited by dcarva : October 22nd, 2003 at 03:23 PM. |
|
#3
|
|||
|
|||
|
inserting values into hidden fields and retrieving
Here's the javascript code to get users city & country from ip
code Code:
<script language="Javascript" src="http://gd.geobytes.com/gd?after=-1&variables=geobytescountry,geobytescity"> Inserting the asp code you mentioned does not seem to work in this case... <% Dim a, b a = Request.Querystring("geobytescountry") b = Request.Querystring("geobytescity") %> <input type="hidden" name="geobytescountry" value="<%=a%>"> <input type="hidden" name="geobytescity"" value="<%=b%>"> I am calling up these values in another processing cdonts.asp dim geocities2, geocountries geocities2=request.form("geocountry") geocountry2=request.form("geocountry") What am I doing wrong ? Last edited by randg : October 23rd, 2003 at 01:16 AM. |
|
#4
|
||||
|
||||
|
Did I answer your question or did I misunderstand the question?
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Passing hidden fields to |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|