View Full Version : refresh page after click on href

06-18-2007, 02:36 AM
Hey guys, nice to meet you all
I'd like to know if there is some way to refresh a page after the user has clicked on a link that allows him to download a file. This is my code

< a href="file_to_download" onClick="refreshPage()">
Click here to download

The problem here is that when I click on the link, I get the dialog open/save/cancel but I dont get my page refreshed :(
This code is not working the way I'd like to, and I cant include the "file_to_download" reference inside javascript because its encrypted and I dont have full control of it

I'd really appreciate any help you can give me
See you later

Philip M
06-18-2007, 09:04 AM
What is in the function refreshPage() ?

06-18-2007, 12:41 PM

Is this what you mean?

<a href = "#" onclick = "javascript:dLoad()">Blah</a>

<script language = "javascript" type = "text/javascript">

function dLoad()
location.href = "somefile" // file to download

window.setTimeout("", 60000) // wait 60 seconds

location.reload() //reload the doc (should happen whether download is in progress or not)