• I have a plugin that, among other things, will auto download files if specific conditionas are met. I want to put up a message telling the user that files are downloading (in the even that they actually are). I’ve tried ‘echo’ing text but the text doesn’t appear on the page until after the download occurs. Why does that happen? How would I go about giving the user an indication that I’m downloading something while they’re waiting for the page to load?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Take a look at the wp-db-backup.php plugin that comes with a default copy of WordPress. It uses an iframe and JavaScript to provide real-time progress status for backups.

    Basically, you would run your PHP download script by changing the src of the iframe, and then use JavaScript on that iframe page to indicate your status for the top page.

    Thread Starter golddave

    (@golddave)

    That’s great. Any help breaking it down would be greatly appreciated. I’m working on it now but I’m learning PHP as I’m doing things so I’m not the most advanced coder on the block.

    Thread Starter golddave

    (@golddave)

    I’ve tried to pull out the progress bar code from wp-db-backup.php but I can’t get it to work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Download Message for User in Plugin’ is closed to new replies.