views:

32

answers:

1

I am unable to get document.execCommand('SaveAs', false, "/home/prakash/temp/log.html") to work in either Firefox or Google Chrome, any ideas ? Am I doing something wrong ?

+2  A: 

Update:

You may find this resource useful :)


Quoting:

Available only in the Win32 platforms for IE, the execCommand( ) method executes the named command.

Source: http://javascript.gakaa.com/document-execcommand-4-0-5-.aspx

More Specific Resource:

Sarfraz
Oh damn ! Is there anyway, I can write to a file from javascript in firefox ?
Prakash Raman
@Prakash Raman: See my updated answer please.
Sarfraz
Great that should work fine for me :)Just have a java applet that can perform the same.
Prakash Raman
Current versions of all the major browsers have implementations of `document.execCommand()`, so the page you linked to is out of date.
Tim Down