HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 21st, 2003, 06:07 AM
randg randg is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 randg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old October 22nd, 2003, 03:20 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old October 23rd, 2003, 01:10 AM
randg randg is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 randg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old October 23rd, 2003, 09:47 AM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
Did I answer your question or did I misunderstand the question?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Passing hidden fields to


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT