Gracias de antemano.
Este es una parte del código:
Código PHP:
<div id="map"></div><br/><br/><br/>
<script type="text/javascript">
new SpainMap({
id: 'map',
width: 500,
height: 300,
fillColor: "#eeeeee",
strokeColor: "#cccccc",
strokeWidth: 0.7,
selectedColor: "#66bbdd",
animationDuration: 200,
onClick: function(province, event) {
var destinoJs = province.name;
alert("Has seleccionado " + destinoJs);
}
//onMouseOver: function(province, event) {
// console.log('Navigating through ' + province.name);
//},
//onMouseOut: function(province, event) {
// console.log('Leaving ' + province.name);
//}
});
</script>
<p>
<?php
$variablephp = "<script> document.write(destinoJs) </script>";
echo "La ciudad es: ".$variablephp;
echo "<br/><br/>";
echo "Destino: <input type='text' id='map' onClick='(document.write(destinoJs))'; name='destino' style='width: 178px; value='' size='15'>";
?>
</p>