saco721 Posted September 30, 2008 Share Posted September 30, 2008 Hi!, I was wondering if it is possible to reload / redirect a page in an iframe after a saveas dialog has been called. It seems like quite a simple concept but I have tried various methods to get this to work without success. All I seem to get is the page reload / redirect or the saveas dialog, never both. here is the code: mainpage.html <html> <body> <iframe src="filedownload.html" width="40%" height="80" align="right" border = "1"> </iframe> </body> </html> filedownload.html: <html> <head> </head> <body> <a href="filedownload.php?filename=filetodownload.txt">Download this text file[/url] </body> </html> filedownload.php: <?PHP header("Content-type: application/octet-stream"); header("Content-Length: ".filesize($filename)); header("Content-Disposition: attachment; filename=$filename"); $fp = fopen($filename, 'rb'); fpassthru($fp); fclose($fp); ?> If it is possible, what code should I use to accomplish this is, and what file the code should go in. I am new to php and js so please be patient. Any help would be grately appreciated! - Thank you Link to comment https://forums.phpfreaks.com/topic/126465-redirecting-page-in-iframe-after-calling-saveas-dialog/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.