473,830 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript">

// Source: CodeFoot.com
// Please leave in this header.

var isReady = false;
function doSaveAs(){
if (document.execC ommand){
if (isReady){docum ent.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="javascrip t: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 2809
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
6295
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 like to be able to populate the Word document with the contents of the currently selected Access record so that when I press the button in Access, Word opens with the appropriate fields populated and ready to print. It is a "one off" event which I...
2
4594
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 them. Everything works fine except a hyperlink to the Word Templates and the hyperlink opens the template but not in the desired maner, it opens it to be edited and not a new document that runs agains the Sql server. Is there a way to hperlink...
4
11136
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 done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
3
4662
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. Is it possible to go straight from a byte array to document in word instead of a temp file? Also is there a way to change the save behaviour to notify my app to pickup a binary copy of the file or stream to save back to the sql db. Thanks in...
4
2516
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 Interop Assemblies (PIAs) for automating Word on the server and everything runs smoothly on the server console. The word documents are generated perfectly from all clients and stored on the server with some data comes from a SQL server and/or stores...
3
3000
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 CUSTDOCUMENT. Once user cliks a button to retrive a document about the customer I need to program in this order:
2
3380
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 confirm that I want to run a query to select the data from the data source file, then it opens the form letter fine. I can preview the merged records and complete a merge to a new document. I have a VB 2006 project (.net framework 2.0) which opens the...
1
1623
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 can be saved directly on the file server. When i click on this button, it opens another windows with the word document linked to the line. But this document is open into the browser ; so i'd like the document
3
3752
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. The problem is that the "OK" button in the dialog box is greyed out. Click on it once, and it becomes available (un-greyed). Clicking a second time opens the file. The link looks like this: <a href="spec_clipon_int.doc" target="_blank">. If...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10771
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10202
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9313
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6950
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3958
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.