Forcing "SaveAs" dialog

admin

Administrator
Staff member
This question has been asked before all over the place, but I haven't been able to make use of the answers given.

More than one answer says use "document.execCommand('SaveAs')" or " document.execCommand('SaveAs',null,'filename.html')"

OK ?? BUT HOW???

How do I actually use this document.execCommand?

My requirement:-
I currently have an icon graphic which when clicked just goes to a PDF document:-
<a target="_blank" href=http://www.webdeveloper.com/forum/archive/index.php/"mydocument.pdf"> <img border="0" src="images/pdf_icon.gif" align="left" width="34" height="34"></a>

My requirement is that a left click of the mouse should bring up the SaveAs dialog, even if the MS IE browser has the PDF plug-in installed. How do I actually use'document.execCommand' to do this?

Can someone give me a complete code snippet?

Many thanks

Richard
 
Back
Top