Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: document.execCommand('SaveAs')


Message #1 by "Justin Mac" <justin@d...> on Wed, 23 Oct 2002 08:25:12
Justin, 

<SCRIPT language="JavaScript">
    function saveImageAs (imgOrURL) {
  
    if (typeof imgOrURL == 'object')
    imgOrURL = imgOrURL.src;
    window.win = open (imgOrURL);
    setTimeout('win.document.execCommand("SaveAs")', 500);
  }
</script>

<BODY>
check this 
<A HREF="javascript: void 0" ONCLICK="saveImageAs(document.binder); return 
false">save image</A> <IMG NAME="binder" SRC="binder.jpg">
</BODY>

hope this will help u 

  Return to Index