Hello, I have the following case. I have a part with just a few data from several places, I would like to do something to open a popup to show all the data of that location, so I would need to pass the same id to the url to make 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>'; }
Now 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 popup is opening correctly, I just do not know how to pass the local id that is in the forearch to the java script.