In my project, I have a file that I want the user to download. When they click on the link, I want a popup window to display "Your download will shortly, if it doesn't start click here". After a few seconds, it will then close and the actual file download will then display.

I know to achieve the window closing you'll use:

```
window.setTimeout(function(){window.close()}, 5000);

```

But I'm not sure how you would call the download once the window has closed?

Cheers for any help!