I have the following code
<script>
function Results()
{
document.report_form.action = "index.php?p=report_view";
document.report_form.target = "_blank";
document.report_form.submit();
return true;
}
function CSV()
{
document.report_form.action = "csv.php";
document.report_form.target = "_blank";
document.report_form.submit();
return true;
}
</script>
<form name='report_form' method='post'>
<input type='submit' name='view_table' value='Display' onclick="return Results();">
<input type='submit' name='view_csv' value='Export CSV' onclick="return CSV();">
</form>
When using Firefox or Chrome, it doesn’t trigger a double popup, when using IE8 , users click once on the button and either 2 windows popup or 2 download requests appear.
I couldn’t find a solution to this, can you please show me where I am wrong?
Thank you
Try return false; instead of return true;