0
Hi, I have the following case. I have a part with just a few data from various locations, I would like to do something to open a pop-up to show all the data from that location, for that would need to pass the id of the same to the url to do the select. Method where I am
foreach ($dadosLocais as $row) {
$marker = array();
$marker['position'] = $row->latitude . ',' . $row->longitude;
$marker['title'] = $row->nome_nascente;
$dadosUsuario = $this->Usuario_model->getUsuario()->row();
$marker['infowindow_content'] = '<h2>' . $row->nome_nascente . '</h2>' . 'Descrição: '
. $row->descricao_nascente . '</br>' . 'Latitude: ' . $row->latitude
. '</br>' . 'Longitude: ' . $row->longitude
. '</br>' . 'Usuário que Cadastrou: ' . $dadosUsuario->nome
.'</br>' . 'Imagem: ' . '<a href="javascript:abrir(500,200)"> Visualizar Imagem</a>'; }
Already my java script is:
<script languague="javascript">
function abrir(largura, altura){ window.open('<?= site_url('Nascente/verImagem') ?>','popup','width='+largura+',height='+altura+',scrolling=auto,top=0,left=0') }
</script>
The pop-up is opening correctly, I just don’t know how to pass the id_local that is in the forearch to the java script.