Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q764 How can you force a download of an image with a form button?

irt.org | Knowledge Base | JavaScript | Image | Q764 [ previous next ]

Q764 How can you force a download of an image with a form button?

Try:

<script language="JavaScript"><!--
function gogetit() {
    if (document.images) {
        var myImage = new Images();
        myImage.src = 'picture.gif';
    }
}
//--></script>

<form><input type="button" value="Click Here" onClick="gogetit()"></form>

Feedback on 'Q764 How can you force a download of an image with a form button?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.