javascript: Invoking The SaveAs Dialog From A Web Page
Re: damn, word doc opens by default, onclick event or similar needed
save as save-as prompt download to
Step 1.: The Script
-------------------
Insert the following script in the head of the page:
<script language="JavaScript">
// Source: CodeFoot.com
// Please leave in this header.
var isReady = false;
function doSaveAs(){
if (document.execCommand){
if (isReady){document.execCommand("SaveAs");}
}else{
alert('Feature available only in Internet Exlorer 4.0 and later.');
}
}
</script>
Step 2.: The Body Tag Interlock
-------------------------------
Include the following onload event call in the body tag. This stops
the script from functioning until the page is fully loaded.
<body onload="isReady=true">
Step 3.: The Link
-----------------
To call the script from the page and activate the SaveAs dialog,
insert a link in the page like this:
<a href="javascript:doSaveAs()">
Click Here To Save This Page
</a>
Re: damn, word doc opens by default, onclick event or similar needed
Subject: ?????HTML SPECIFICATIONS / ONCLICK EVENTS/????
hi,
anyone know where i might find onclick events listed? I need to see all
possible onclick events, html preferred and not necessarily javascript.
I need links on web page to word files to prompt to save or download, and not opening automatically when clicked. It's driving me up the wall, hours and hours, and I know I've done this before, a few years ago.
ME
Subject: HTML question (need htm link to save, not open doc files)
HTML question (need htm link to save, not open doc files)
zips give you an option to save or open, but docs just open, slow and hang
the system for a minute.
mike
Subject: onclick event or similar needed
Hi,
links to doc files always open. I need a prompt to save, not to freakin
open. href onclick or onload, or something , anything that you might think of except renaming/converting files would be appreciated.
no zips zip file convert download me