Good night I need help in html .... I am not able to pass the parameter correctly to another html page.
page 1 is a table that is the list of vacancies. When you click on the vacancy button, it makes the request for the details page. The details page is another form, with all the details of that vacancy selected. The problem is that I can not do the function that calls the detail of the selected id's slot.
Code
<div class="container-fluid">
<div class="row">
<div class="col-sm-10 col-md-10 col-sm-offset-1 col-md-offset-1 main">
<h2 class="page-header">
Vagas Trabalhadas
<div class="pull-right">
<a onclick="generatefile();" class="btn btn-success">Exportar Vagas</a>
</div>
</h2>
<div class="table-responsive">
<table id="example" action="_class/load_vagas.php" name="listavagas" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th valign="middle">RP</th>
<th valign="middle">Area Atuacao</th>
<th valign="middle">Alocacao</th>
<th valign="middle">Data Recebimento</th>
<th valign="middle">Data Recrutamento Inicio</th>
<th valign="middle">Status</th>
<th valign="middle">Pendencia</th>
<th valign="middle">Analista Universia</th>
<th align="center" valign="middle">Detalhes da Vaga</th>
</tr>
</thead>
<tbody>
<?php foreach($return[0] as $k => $v): ?>
<tr id-vaga="<?= $v->id_vaga; ?>">
<td valign="middle" class="Rp"><?= $v->rp; ?></td>
<td valign="middle" class="AreaAtuacao"><?= $v->area_atuacao; ?></td>
<td valign="middle" class="Alocacao"><?= $v->alocacao; ?></td>
<td valign="middle" ><?= dataToSite($v->data_recebimento); ?></td>
<td valign="middle" ><?= dataToSite($v->recrutamento_inicio); ?></td>
<td valign="middle" ><?= $v->status; ?></td>
<td valign="middle" ><?= $v->pendencia; ?></td>
<td valign="middle" ><?= $v->analista_responsavel; ?></td>
<td align="center" valign="middle">
<img src="imgs/plus.png" width="30" height="30" alt="Mais informações" style="cursor:pointer" id="btnloaddetalhes" name="btnloaddetalhes" onclick="loaddetalhes('<?= $v->id_vaga; ?>');"></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
the problem is in the onclick="loaddetalhes ('id_vaga;?';"); ".... how to take the id_vaga to the next html page. This data will be used to load all information from the details page.
I'm doing this: but I could not retrieve the parameter
function loaddetalhes(idVaga) {
document.getElementById("id_vaga").innerHTML = idVaga;
sessionStorage.setItem('id_vaga', idVaga);
window.open('detalhes_vaga.php');
}
When I gave the window.open, I had to retrieve the parameter, to use it in loading data with php, but I could not get back with the 'id_vaga' ... vlw