A
Anonymous
Guest
Below code works correctly in IE but produces an error in IE what is wrong with this.
Code:
function saveImageAs (imgOrURL)
{
if (typeof imgOrURL == 'object')
imgOrURL = imgOrURL.src;
//window.win = open (imgOrURL);
setTimeout('window.document.execCommand("SaveAs")', 500);
}
<a href="#" onclick="saveImageAs(document.frm.anImage); return false;" class="bottom_text">Save Image</A>