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?

246 of 332 people (74%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I use Javascript to automatically prompt the user the 'Save As..' box to save an HTML Page?
How can I use Javascript to automatically prompt the user the 'Save As..' box to save an PDF File?

Apr 5th, 2008 19:08
ha mo, jsWalter, Faisal Syed, Venkatesha Munivenkatachari,


Use this function...
function saveAsMe (filename)
{
	document.execCommand('SaveAs',null,filename)
}
I used this button...
<input type=button value="Save As" onclick="saveAsMe('ww.txt');">
Walter
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