I have included an image code in my HTML file:
<span style="display:inline">
<img NAME="anImage" height="250" src="https://chart.googleapis.com/chart?" alt="">
</span>
Now, I would like to enhance this by adding a button. When the button is clicked, I want a system "save as" dialog to pop up so that users can save the image to their local disk.
<input id="saveImage" type="button" value="Save Image"></input>
<script type="text/javascript">
.............
</script>
Any ideas on how to achieve this functionality?