Raga' avrei bisogno di aprire una mappa di google in un pop up
Il problema e' che devo prendere il nome dell'albergo tramite php e database.
In pratica se faccio cosi' funziona:
function apri_mappa() {
var w = 700;
var h = 530;
var l = Math.floor((screen.width-w)/2);
var t = Math.floor((screen.height-h)/2);
window.open("http://www.sito.it/mappa_hotel.php?hotel=hotel plaza","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}
mentre io vorrei fare qualcosa tipo:
function apri_mappa() {
var w = 700;
var h = 530;
var l = Math.floor((screen.width-w)/2);
var t = Math.floor((screen.height-h)/2);
window.open("http://www.sito.it/mappa_hotel.php?hotel=<?php print "$hotel";?>","","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}
Dove <?php print "$hotel";?> sarebbe l'hotel.
Come posso fare?