Save As Image Problem in Mozilla Firefox

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>
 
I think execCommand("SaveAs") is not supported by Mozilla.... what is your view?
 
pretty much what i thought.. however look at http://developer.mozilla.org as they have the documentation for everything that has to do with JS and Mozilla
 
Back
Top