I have been trying to figure out how to open documents such as Word and Excel files with functional toolbars but I am stumped. Can anyone provide some insight on this?

Recommended Answers

All 7 Replies

I have been trying to figure out how to open documents such as Word and Excel files with functional toolbars but I am stumped. Can anyone provide some insight on this?

The files are linked to a JS menu tree and when they come up they are in new windows but the document toolbars are missing. HAs anyone encountered this and do you know what I'm doing or not doing that could be causing this to happen.

This is the code I'm using to launch the links:

function deadCenter(url) {
putItThere = window.open(url,'putItThere','width='+wd+',height='+ht+',left='+((chasm-wd-10)*.5)+',top='+((mount-ht-25)*.5)+',scrollbars,status,titlebar,toolbar,directories');
if (putItThere & !putItThere.closed)
putItThere.focus();
}

THis sounds like a security issue.

Allowing a web page to do this would also allow a web page to access parts of a user's hard disk without the user's permission. It could also give the user unwanted access to server files. So the user is allowed to see the document using the program, but not allowed to edit it.

For the user to be able to edit the document, it must be downloaded to the user's computer with FTP or a similar means. Then the user must on his own volition act to open the file, using Windows Explorer or My Computer.

Yes !! it must be downloaded to user's computer then user can access the file from there computer's hard Disk atleast it'll not create a security risk. As an analyst I'll recommend you this...

THis sounds like a security issue.

Allowing a web page to do this would also allow a web page to access parts of a user's hard disk without the user's permission. It could also give the user unwanted access to server files. So the user is allowed to see the document using the program, but not allowed to edit it.

For the user to be able to edit the document, it must be downloaded to the user's computer with FTP or a similar means. Then the user must on his own volition act to open the file, using Windows Explorer or My Computer.

I'm just trying to allow the user to print or save the document. How do I enable the print and save functionality?

Simply allow the user to donwload the document rather than showing it in a popup window. A good browser will give an option; for the user to either save the file, or open it; when one clicks a link like:
http://mysite.tld/mydocument.doc
Opening the document should open it in the registered application for .doc files. To my knowledge, it's only internet explorer that defaults without asking to opening word files in an internet explorer-mixed-with-ms word window. It's an awful feature.
However, the print and save features of the File toolbar should work anyway; even when the doc is in an IE window..

So remove the script for open window and just leave it as an href link on the menu tree?

I would. That way, a nice browser; Firefox, Opera etc, will prompt to open ( in the default .doc application ) or save the file, and IE may or may not open the file in the browser window depending on preferences... File>Print and File>Save as should certainly still work, even in an IE mixed with Word window...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.