Entry
How do I write an "onclick" script that will open the "Save as" window to save a linked file?
Apr 6th, 2008 18:41
ha mo, Colin Fraser, Sue Steyh,
The problem I see is that you are attempting to take control of a
browser function, and that is not always possible.
For Netscape browsers it is unlikely that you can do so at the moment,
however for IE I suspect that there would be some call to a dialogue box
that will do it, however, looking for it could be time consuming, you
may want to look in this site first..
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/dhtmlrefs.asp
OK, it is the Dark Side, but I know of no other place to look for
information on IE.. They may also suggest some other way of doing what
you want, but it will probably not work anyway..
Sorry, but this is the best advice I have at the moment, hopefully
someone else may have a better answer, but dont wait for it..
===========================================
To follow this up, you may try
function saveFile (fname)
{
document.execCommand('SaveAs',null,fname)
}
You can use a button
<input type="button" value="Save" onClick="saveFile('thispage.htm');">
or text
<a href="javascript:null()" onClick="saveFile('thispage.htm');">Save
File</a>
Good luck..
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com