htmlViewer / javascript

Bjr
I have a probleme whith Javascript in a htmlViewer
I try exxecut this code:
map.on(‘click’,function(e)
{
var coord = e.latlng.toString().split(’,’);
var lat = coord[0].split(’(’);
var long = coord[1].split(’)’);
alert(“you clicked the map at LAT: “+ lat[1]+” and LONG:”+long[0])
}
In safari, it is ok but in xojo I have not the windows

Bjr
J’ai un problème avec Javascript dans un htmlViewer
J’essaie d’exécuter ce code :
map.on(‘click’,function(e)
{
var coord = e.latlng.toString(). split(’,’);
var lat = ‘bonjou’;
alert("vous avez cliqué sur la carte "+ lat )
}
En safari, tout est ok mais dans xojo je n’ai pas la fenêtre

Indeed, HTMLViewer does not pop the alert.

What you could do is to use for instance TitleChanged event to communicate back with the Xojo code.

document.getElementById("title").innerHTML = "vous avez cliqué sur la carte "+ lat;

On Mac, some programmers use StatusChanged instead.