Iframe makes tab, tab needs to refresh iframe.
Posted: Wed Aug 12, 2009 3:59 am
I have a button in an iframe that when clicked opens a new tab which generates a .csv file. When it's done loading i need the tab to refresh the iframe as it changes some data.
Either that, or a method for the button to open the script which creates the .csv and then to refresh the iframe which it would then be in.
Either that, or a method for the button to open the script which creates the .csv and then to refresh the iframe which it would then be in.
Code: Select all
<tr><td><div align="center">
<button type="submit" name='View'
onclick="window.open('<? echo $_SERVER['PHP_SELF'] ."/Suppliers.php" ?>','mywindow','width=400,height=200');
window.setTimeout(function(){location.reload(true);}, 20);">
BUTTON</button>
</div></td></tr>Code: Select all
header('Content-type: text/csv');
header('Content-Disposition: attachment; filename="'.$_SESSION['CCODE'].'-Suppliers.csv"');