Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zip file to download

Status
Not open for further replies.

korata

Technical User
Aug 24, 2004
38
US
Is there a way to prompt a window for the user to download a zip file using javaScript
 
I'm not exactly sure what you're asking. By default, the user should get a prompt if they click on a link for a zip file. Are you looking for something like this?
Code:
<script>
function getZip(){
  if(prompt('Are you sure you want to download this?')){
    location.href='myZip.zip';
  }
}
</script>

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
Thank you. I do not know what i was thinking it is righ the will get a prompt by defualt that defenetily answer my question.thank for prompt reply
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top