I have a form that by pressing submit it takes the selected value and takes you to the destination page of the action and opens the page, but overlays the current page, I need to take these values from the form to the pop up page without the form opening the action page.
<form id="form1" name="form1" method="get" action="folhapgt_imprimir.php">
<select name="data_selecionada" id="data">
<?php $dados = mysql_query("SELECT DISTINCT periodo FROM folha_func_sal_cc ORDER BY periodo DESC") or die(mysql_error());
while ($data = mysql_fetch_array($dados))
{
echo "<option value='{$data['periodo']}'";
if($_GET['data_selecionada'] == $data['periodo'])
echo "selected='selected'";
echo ">{$data['periodo']}</option>";
}
?>
</select>
<input type="submit" name="submit" id="submit" value="OK" style="margin-left: 10px;">
</form>
</li>
I tried with
function pop()
{
POP = window.open('folhapgt_imprimir.php', 'thePopup', 'width=350,height=350');
}
but without success, open the page that I need but does not take the value.