1
I have a form that when pressing Ubmit it takes the selected value and takes to the target page of the action and opens the page, but overlap the current page, I need to take these values of the form to the page pop up without the form open the page of the action.
<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>
tried with
function pop()
{
POP = window.open('folhapgt_imprimir.php', 'thePopup', 'width=350,height=350');
}
but without success, opens the page I need but does not take the value.
Passes via get in the URL, like "window.open('popup.html? var1=value', ...)
– Rodrigo Mello