sg

Çarşamba, Ocak 04, 2006

marker click to open another page


I know I can use some code similar to this to open a markers info
window when I click it:

var marker = new GMarker(point);
// Show this marker's index in the info window when it is clicked.
var html = "Marker #<b>" + number + "</b>";
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});

but what I actually want to do is to open another web page when I click
on the marker...something like this?:

var marker = new GMarker(point);
// Show this marker's index in the info window when it is clicked.
var html = "another_page.htm";
GEvent.addListener(marker, 'click', function() {
window.open("_self",html);
});

but am not 100% certain as to how I'd do it? Or if it is possible?

Can anyone with a bit more javascript experience help?

Thanks in advance

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık