faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

8 of 12 people (67%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

can anyone send me the code of FileSaveAs, so that i can use it for saving report as an html file.

Apr 7th, 2008 22:39
ha mo, Colin Fraser, Mathew Jose,


Try this:
function saveFile (fname)
{
	document.execCommand('SaveAs',null,fname)
}
You can use a button 
<input type="button" value="Save" onClick="saveFile('thispage.htm');">
or text
<a href="javascript:null()" onClick="saveFile('thispage.htm');">Save
File</a>
Good luck, this may not work in earlier versions of NN
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com