Iframe makes tab, tab needs to refresh iframe.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
etherkye
Forum Newbie
Posts: 21
Joined: Fri Aug 07, 2009 3:40 am

Iframe makes tab, tab needs to refresh iframe.

Post by etherkye »

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.

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"');
Post Reply