Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>How to save a newly opened page using JavaScript

How to save a newly opened page using JavaScript

Jayaprabhu_m
03-15-2006, 05:00 PM
Hi,

I have a html page with a hyperlink to another page. Upon clicking the hyperlink, the link will be opened in a new window. The link will open a word document from internet.

What i need is, when the word document is opened in the new window, the word document should be saved automatically in the hardisk too.

Could anyone please help me out to write javescript to save the word document opened in the new window.?

For Example:

I need to open the following link in a new window, at the same time the document should be saved in harddisk.

http://www.nydic.org/nydic/documents/FinalCompetencies1.doc

Or any other way to save the word document in the hardisk without manual Intervention will be helpful.

Thanks and Regards,
Jayaprabhu.M

A1ien51
03-15-2006, 08:05 PM
The browser does what it is set to do by default. So there is really nothing you can do other than tell the person to right click and do a save target as.

Eric

felgall
03-15-2006, 09:28 PM
If the browser doesn't know how to display Word documents (which most apart from IE don't) then the file will be offered for download instead. Of course many of your visitors wont have the right version of Word installed or will be missing some of the fonts and so will be unable to view the content the way you intended it anyway.

Beagle
03-15-2006, 09:50 PM
Yeah, basically, you don't have any control over what the user's machine does with the file. If the user has their browser setup to always open the file instead of being asked to save it, there's nothing you can do about it.

You could try changing the header information before sending out the file (requires server-code), but if you do that, then it won't also open in browsers that are configured to open the document. So it's one or the other I'm afraid.


 

TOP

Hyperthreading hurts s
HP sharpens blade PC l
Apple goes for Quad po
Itanium gets scaled do

For more info

HP sharpens blade PC l
Hyperthreading hurts s
can not call click() i
script does not work o
smart menu 
write to an html file 
FireFox doesn't recogn
Changing e.keyCode (e.
Clearing a range creat
UPDATE: My mouse over 

News Archive

onChange Help 
beforeload? vs onload.
Problem with document.
decreasing my javascri
Problem with \\ and \ 
how to stop scrolling?
Change Label Text Colo
Can I forward a page b
2 javascript functions
Validating a textbox 

Related stories:

changing select box value
Help with Validating Form
Date() function pulling different code in different browsers.
Div help
How to disable checkbox without "disable"?
Any moo.fx user here? Need help in hiding form.
Conditional statement to determine form action
Find on Page
problems with JS trying to get all quantity

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics