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
How to configure "SAVE AS" button?
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: How to configure "SAVE AS" button?
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.preza wrote:Someone knows what i'm doing wrong
Re: How to configure "SAVE AS" button?
I've tried to change the parameter null to false, but it didn't make difference. 