-4

This Code i written to download a resume : Inside a button

onclick="window.location.href='/Uploads/Resume/1.docx'"

The file is downloading but if file not found in that path then i have to show a message Like file is not Found How can I do this

Satpal
  • 126,885
  • 12
  • 146
  • 163
Raj
  • 81
  • 1
  • 2
  • 8
  • An advanced UI design should be to disable the button after checking if the link is live or not. http://stackoverflow.com/questions/13310029/use-jquery-to-check-if-links-still-work http://stackoverflow.com/questions/1414365/how-to-disable-enable-an-input-with-jquery – Debajyoti Das Jan 24 '14 at 16:44

1 Answers1

2

Your web browser will already do that, as it does for any web path that returns a 404 error.

So simply let that mechanism do its job.

Lightness Races in Orbit
  • 358,771
  • 68
  • 593
  • 989