Hello everyboy,
Im trying to give my directory links a shdowbox link to display business address on my local directory from Google Map, and I'm wondering if anyone will know how can I pass the variable from my link.html template to my external JS in order to display the Google Map.
My JS code looks like this:
Shadowbox.open({
player: 'html',
content: '',
height: 300,
width: 500,
options: {
onFinish: function(item){
if (GBrowserIsCompatible()) {
var body = document.getElementById(Shadowbox.contentId());
var map = new GMap2(body);
var geocoder = new GClientGeocoder();
var myLatLon = geocoder.getLatLng(
'<%Address%>', function(point) {
if (point) map.setCenter(point, 16);
if (point) map.addOverlay(new GMarker(point));
map.addControl(new GSmallMapControl());
}
);
}
}
}
});
}As you can see on the code, im calling on the external JS my tag named: <%Address%>
Any help will be really appreciate it!
Jesus
Im trying to give my directory links a shdowbox link to display business address on my local directory from Google Map, and I'm wondering if anyone will know how can I pass the variable from my link.html template to my external JS in order to display the Google Map.
My JS code looks like this:
Code:
function verDireccion(){ Shadowbox.open({
player: 'html',
content: '',
height: 300,
width: 500,
options: {
onFinish: function(item){
if (GBrowserIsCompatible()) {
var body = document.getElementById(Shadowbox.contentId());
var map = new GMap2(body);
var geocoder = new GClientGeocoder();
var myLatLon = geocoder.getLatLng(
'<%Address%>', function(point) {
if (point) map.setCenter(point, 16);
if (point) map.addOverlay(new GMarker(point));
map.addControl(new GSmallMapControl());
}
);
}
}
}
});
}
Any help will be really appreciate it!
Jesus