Linking to maps (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


steveg -> Linking to maps (3/31/2008 11:56:41)

Hi
I have a search that produces a list of companies. One of the fields against each company is a zip code. I would like to build some text around the zip code to make it into a zip.

The code I have is
http://maps.google.com/maps?q=,+MI+48084,+United+States+of+America&sa=X&oi=map&ct=image


The code 48084 is the sample zip code that I used in my test link. This is the google maps code I would like to use.

Iwould like that zip code to be replaced by the zip code field results and the the whole thing to be a hyperlink. I think its possible, but I can't quite get my head around the approach I need to take.

Any ideas?

Steve




rdouglass -> RE: Linking to maps (3/31/2008 12:17:42)

quote:

http://maps.google.com/maps?q=,+MI+48084,+United+States+of+America&sa=X&oi=map&ct=image


Are you using a DRW or just ASP? Either way, it would look similar. Something like:

<a href="http://maps.google.com/maps?q=,+MI+<%=FP_FieldVal(fp_rs,"CompanyZIPCode")%>,+United+States+of+America&sa=X&oi=map&ct=image">Map</a>

An FP DRW might look something like that. That help any?




steveg -> RE: Linking to maps (3/31/2008 12:30:01)

I just went back and played around and came up with exactly that! Thank you.

At the moment I have the link displaying the word MAP next to the zip code. Ideally I would like to have the zip code displaying and being the link. I have tried to use <%=FP_FieldVal(fp_rs,"CompanyZIPCode")%> as the text to display but that is not allowed for some reason. Can you see any other way around it?

Steve




rdouglass -> RE: Linking to maps (3/31/2008 14:03:59)

quote:

have tried to use <%=FP_FieldVal(fp_rs,"CompanyZIPCode")%>


If you tried to use it like this:

<a href="http://maps.google.com/maps?q=,+MI+<%=FP_FieldVal(fp_rs,"CompanyZIPCode")%>,+United+States+of+America&sa=X&oi=map&ct=image"><%=FP_FieldVal(fp_rs,"CompanyZIPCode")%></a>

that is just how I'd do it. Can you explain more about it not allowed? Does the DRW error or something?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.1875