Page 1 of 1

How to configure "SAVE AS" button?

Posted: Thu Jun 12, 2008 7:26 am
by preza
Hy All,
I'm trying to configure a "Save as" button to save page in html format but it doesn't work like i expected.
Actually I'm using the following code :

Code:
<td align="center" nowrap width="33%"><input type=button value="Save As" onclick="saveasbox('myfilename.htm');"></td>
<script>
function saveasbox (filename)
{
document.execCommand('SaveAs',null,filename)
}
</script>


Someone knows what i'm doing wrong
Thanks,
Preza

Re: How to configure "SAVE AS" button?

Posted: Thu Jun 12, 2008 7:38 am
by superdezign
preza wrote:Someone knows what i'm doing wrong
I barely know what you're doing at all. But, from what my quick Googling has shown, execCommand()'s second parameter should be false, not null. However, I doubt that it makes a difference.

Re: How to configure "SAVE AS" button?

Posted: Thu Jun 12, 2008 9:01 am
by preza
I've tried to change the parameter null to false, but it didn't make difference. :(