Pigdogmonster
asked on
left click to download
Hi, Thanks for looking at my question!
Does anyone know a simple script that allow the user to click a link or button with the left mouse that brings up the Download dialog box?
Normally you have to right click and go to 'Save As'.
Many thanks
PDM
Does anyone know a simple script that allow the user to click a link or button with the left mouse that brings up the Download dialog box?
Normally you have to right click and go to 'Save As'.
Many thanks
PDM
ASKER
thanks Anindya,
Could you give me an example say with an Image
i.e.
<img src="Download.gif" border="0" onclick="">
Thanks
PDM
Could you give me an example say with an Image
i.e.
<img src="Download.gif" border="0" onclick="">
Thanks
PDM
<html>
<script>
function f()
{
document.execCommand("Save As",true," C:\\My Documents\\Saved Content.html");
}
</script>
<body>
<img src="download.gif" onClick="f()">
</body>
</html>
<script>
function f()
{
document.execCommand("Save
}
</script>
<body>
<img src="download.gif" onClick="f()">
</body>
</html>
ASKER
thanks Anindya,
How can I make the filenname a variable?
As I will be using within a loop in ASP.
How can I make the filenname a variable?
As I will be using within a loop in ASP.
ASKER
Dont worry!
I found it...
<a href="javascript:void(0);"
onclick="document.execComm and('SaveA s',true,'f ile.html') ;"
>Save this page</a>
Thanks again!
PDM
I found it...
<a href="javascript:void(0);"
onclick="document.execComm
>Save this page</a>
Thanks again!
PDM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
function f()
{
document.execCommand("Save
}
f should be called on the onClick event handler for a button, etc.