473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

word doc opens by default

ME
http://www.codefoot.com had this; but can someone give me a clue?

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


Jul 23 '05 #1
1 2793
On Sun, 5 Sep 2004 22:06:06 -0500, ME <me@mine.com> wrote:
http://www.codefoot.com had this; but can someone give me a clue?

javascript: Invoking The SaveAs Dialog From A Web Page


There is only one way to do this properly: on the server. It involves
sending the Content-Disposition header to the client. See the FAQ:

<URL:http://jibbering.com/faq/>

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dadio | last post by:
Hello On my Access database form I have a command button which opens a Word mail merge document in which I have created a number of fields (Title, FirstName, LastName, Address1 etc.) I would...
2
by: Russell the Muscle | last post by:
Where I work we have Thousands of Word Templates that when opened loads data form a SQL Server database. Because we have so many templates I created a access database so we can easly search though...
4
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into word and make word do its thing as a com object. ...
4
by: Kash | last post by:
Hi everybody: I've developed a web application running on a 2003 server not on the web but on extranet environment of a small Firm (less than 10 users). I've taken benefit of Office Primary...
3
by: Niyazi | last post by:
Hi, Its like a I am searching alot but still not found or satisfy what I found it. My question is that I had SQL server that contains some data. I also have a application folder call...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
1
by: fab | last post by:
Hi, I'm developping a web-application on an intranet. I've got a datagrid with a button on each line. Each line represents a document (MS Word doc). These documents are on a share so that they...
3
by: barrygoodz | last post by:
I have set up links on a web page to Word files. When you click the link a dialog box opens asking whether to open or save the file. The default program to open the file is MS Word. So far so good....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.