JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Down From onClick Posted by rayk on 26 Oct 2001 at 12:31 PM
H ello,
I was just wondering if anyone can help me with downloading a document from an onClick button. Any help would be greatly appreciated, thank you.

Report
Re: Down From onClick Posted by ArashSayadi on 31 Oct 2001 at 3:53 PM
: H ello,
: I was just wondering if anyone can help me with downloading a document from an onClick button. Any help would be greatly appreciated, thank you.
:

If the file is anything other than an html/text page (and any Office document in case users with IE 5+), then all you need to do is the following:

<input type="button" name="Download" onClick="location.href='myFile.ext'">

where myFile.ext is the name and extension of the file you wish to allow the user to download.

Good luck.


Happy Computing,
Arash Sayadi
15530-B Rockfield Blvd. Suite 4
Irvine, CA 92618
949-830-1623 x36
949-830-2120 Fax
www.pts1.com
arashs@pts1.com






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.