+ Start a Discussion
jf317820jf317820 

javascript syntax question

hello everyone, i have a question regarding an s-control i've built.  it's a google maps mashup, and im trying to insert a link into the location bubble to view the particular place in google earth.  i've found the correct link format (essentially the location url plus "output=kml"), but i'm having trouble getting the link to work in the s-control.

i'm formatting the bubble like so:

Code:
html += "<TD nowrap><font size=2 face='Arial, Helvetica, nonserif'><B><A HREF='#' onClick='openWindow(\"/" + prop.ID + "\"); return false;'>" + prop.name + "</A>
</B><BR>"+prop.location+"<BR><B><A HREF=' + prop.earth + '>View in Google Earth</A></B><BR>" + prop.status +"<TD><img src='"+ prop.imageURL + " ' height=80></font></TD>";
html += "</TR></BODY>";

My problem is getting the "View in Google Earth" link to launch the url...when I click the link now, it just gives me a message stating that URL doesn't exist within Salesforce.  Any help would be appreciated.

Thanks!

tyshocktyshock
It looks like the prop.earth field is what is storing the link.  What is the value of prop.earth?
jf317820jf317820
the value is a url...i know what it's doing, but i dont have the javascript knowledge to fix it :smileyhappy:

i need that "View in Google Earth" link to launch the value of the prop.earth field.

Message Edited by jf317820 on 05-04-2006 10:56 AM

Message Edited by jf317820 on 05-04-2006 10:58 AM

tyshocktyshock

It sounds like an absolute versus relative link problem.

 

If you can post the actual example of a value/url that's not working, that will help.

jf317820jf317820
the link thats showing up is a na1.salesforce.com/servlet/prop.earth sort of thing, so in essence, i'm not using the correct syntax to call the value of that field (which i'm referencing as prop.earth [the field name is Google_Earth__c]).

the link should be something like: http://maps.google.com/maps?f=q&hl=en&q=110+merion+avenue+conshohocken,+pa+19428&ll=40.069927,-75.313683&spn=0.025485,0.086517&om=1&output=kml

i need the "View in google earth" link to launch the VALUE of the prop.earth field (which is a url like the one above), which is external of Salesforce.

hope this is clear enough...i think this is much simpler than i'm making it out to be
jf317820jf317820
nevermind, i figured it out...thank you so much for your help
DevAngelDevAngel
Would you mind posting your solution?
jf317820jf317820
yeah, sorry about that...here's the way it worked:


[A HREF="+ prop.earth +"]View in Google Earth[/A]