I use Clarion 11EE build 13815 together with AnyScreen 2.1 and I’m trying to use java script code with html according to the AnyScreen documentation, if running the html in the internet browser it works now using it to test on Anyscreen through PRAGMA TAGS start and end, doesn’t it work? Does anyone know what can be fixed?
I place this HTML code embedded in a button and the photo image does not appear, now if I use the same code to open in the browser only the HTML content works.
PRAGMA ('option(eol_is_space => on)')
AnyScreen:SetProperty(?IMAGE1,PROP:HTML,'
<DOCTYPE html>
<html>
<body>
<div>
<img src="mapa.jpg" alt="" usemap="#MapaEmp">
<map name="#MapaEmp" id="#MapaEmp">
<area alt="" title="Janela 1" href="javascript:janela1()" shape="poly" coords="58,138,131,116,136,56,123,44,60,43,51,60,48,94,48,120,50,136" />
</map>
</div>
<script>
var clicado1 = false
function janela1() {
if(!clicado1){
let janela1 = document.createElement("option")
janela1.text = "Janela 1 foi adicionada"
flista.appendChild(janela1)
valores.push("janela 1")
//lista.push("janela 1")
//ainda precisa marcar um X no local clicado
clicado1 = true
}else{
if (flista.length > 0 && valores.length>0) {
flista.remove(flista.length-1)
valores.pop()
}
clicado1 = false
}
}
</script>
</body>
</html>')
PRAGMA ('option(eol_is_space => off)')