[Solved] Open link to file in program, not browser

Discuss setup / installation issues - Add a spell checker, Language pack?

[Solved] Open link to file in program, not browser

Postby boz » Mon Feb 21, 2011 6:37 am

I have created some html links to Open Office documents on our local web. When I click the links the files open in a browser window. I want to force them to open in their corresponding programs, and not in the browser. How can I do this?
Last edited by Hagar Delest on Sun Feb 27, 2011 12:06 pm, edited 1 time in total.
Reason: tagged [Solved].
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby MrProgrammer » Mon Feb 21, 2011 8:27 am

Hi, and welcome to the forum.

boz wrote:I have created some html links …
HTML (Hyper Text Markup Language) is a format that implies using a web browser. But if you want to create hyperlinks that open files other than HTML documents, use Insert, Hyperlink, Document (left side of the dialog box), and enter the file's name in the Document Path field (or use the Open File button to its right).

If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3956
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Open link to file in program, not browser

Postby boz » Mon Feb 21, 2011 1:37 pm

What I mean is, I have links on a web page. The links point to OpenOffice documents (and they are not html documents). For example, one link points to "abcd.ods". When I click on the link to open the document, it opens automatically within the browser. I don't want it to do that. I want it to open in the corresponding program - calc.

I know this isn't specifically an OpenOffice question, but I thought someone here might know some script or code which forces documents to open in their parent programs, and not within the browser page. Sorry if it's irrelevant.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby Zizi64 » Mon Feb 21, 2011 2:43 pm

Hi,

The

<A HREF="file://///Computer_name/Shared_Drive_name/Path/Filename.odt" TARGET="_blank">link to a file</A>

format works for me fine on our LAN (With Firefox3.6.13 on Windows XPprofSP3).
(Better way to download the file into the local drive, and then open it. The direct opening procedure maybe will more problematic)
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.1; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8896
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open link to file in program, not browser

Postby rudolfo » Mon Feb 21, 2011 3:03 pm

Generally this kind of link is not different from a link to a pdf document. In other words you have to tell the browser that the mime type (or the extension .ods) should be opened with the external program scalc.exe.
And if you link from a webserver (protocol http://) in your LAN to a local or UNC resource (protocol file://) at least in firefox some security restrictions are applied which would not let you open this file resource (see http://kb.mozillazine.org/Links_to_loca ... n%27t_work on how to work around this restriction). Probably not relevant in your case, because you can open the file in the browser.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
rudolfo
Volunteer
 
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Open link to file in program, not browser

Postby boz » Tue Feb 22, 2011 3:38 pm

Zizi64 wrote:Hi,

The

<A HREF="file://///Computer_name/Shared_Drive_name/Path/Filename.odt" TARGET="_blank">link to a file</A>
format works for me...


Our links follow the same format: "..\docs\forms.ods" target="_blank">Forms</a>". But the files open in a browser window, which I don't want them to do.
Half the reason is because sometimes when it opens in a small window or when you try to resize the window, things go a bit strange; the files end up filling only half the window, with just blank space below, and then the browser crashes every now and then. The other reason is, I want people to modify the original document, and not use copies - so I don't want them downloading the file, modifying it, and then copying it back to the server. Only want one person modifying a file at one time, basically.

I know I could easily solve the problem by putting a bunch of shortcuts on their desktops, but that's not what I want either, for various reasons.
Last edited by boz on Tue Feb 22, 2011 3:47 pm, edited 1 time in total.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby boz » Tue Feb 22, 2011 3:44 pm

rudolfo wrote:Generally this kind of link is not different from a link to a pdf document. In other words you have to tell the browser that the mime type (or the extension .ods) should be opened with the external program scalc.exe.


I was thinking it had to do with something along those lines. I remember Netscape had settings where you could configure mime types.
Problem is we use Internet Explorer here.

Anyone know where the settings are?
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby Zizi64 » Tue Feb 22, 2011 4:22 pm

Our links follow the same format: "..\docs\forms.ods" target="_blank">Forms</a>". But the files open in a browser window, which I don't want them to do.


1: Wich browser? (Firefoy, IE, Chrome?)

2: What is the begin of your link? ("file://///" or other characters?)
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.1; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8896
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open link to file in program, not browser

Postby rudolfo » Wed Feb 23, 2011 1:51 am

If you say that you want to have your users modifying the original file and not a downloaded copy it makes only sense if you use UNC paths ... which are basically links using the file:// protocol but with a resource on a remote share. You may need to experiment a bit with the number of slashes. Mozilla based browsers expect 5 forward slashes: 2 for belonging to the protocol, one for the root node and the final two for the UNC naming of the remote host. IE in newer versions will accept this as well, but older versions used 3 or 4 forward slashes (can't remember exactly). But stay away from backward slashes, they are wrong in URLs.

For file associations IE uses the configuration in the registry, HKEY_CLASSES_ROOT. The same that is used by the File Manager WIndows Explorer. In other words if you can double click on a .odt file in Windows Explorer and it opens in Writer it should work in IE as well. There is one tiny difference Windows Explorer ignores the Setting for the Value "Content Type" in the registry key ".odt", but for Internet Explorer it is relevant: On my system it is: "application/vnd.oasis.opendocument.text" (Not really sure about this, it could be that the Content Type is ignored by IE as well, if the file is not served via http:, but through file:)

On second thought: The scenario that you describe sounds very much like you'd better use a Webserver with WebDAV enabled. Remember DAV stands for "Distributed Authoring and Versioning". It is not difficult to set this up, not in Internet Informaton Server and not in Apache.
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
rudolfo
Volunteer
 
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Open link to file in program, not browser

Postby boz » Thu Feb 24, 2011 6:04 am

Zizi64 wrote:
1: Wich browser? (Firefoy, IE, Chrome?)

2: What is the begin of your link? ("file://///" or other characters?)


1. IE
2. It's a just relative link pointing to a file in another directory. Doesn't begin with "file://..." or anything, just <a href="../docs/forms.ods">... That's all.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby boz » Thu Feb 24, 2011 6:36 am

rudolfo wrote:If you say that you want to have your users modifying the original file and not a downloaded copy it makes only sense if you use UNC paths ... which are basically links using the file:// protocol but with a resource on a remote share. You may need to experiment a bit with the number of slashes. Mozilla based browsers expect 5 forward slashes: 2 for belonging to the protocol, one for the root node and the final two for the UNC naming of the remote host. IE in newer versions will accept this as well, but older versions used 3 or 4 forward slashes (can't remember exactly). But stay away from backward slashes, they are wrong in URLs.

For file associations IE uses the configuration in the registry, HKEY_CLASSES_ROOT. The same that is used by the File Manager WIndows Explorer. In other words if you can double click on a .odt file in Windows Explorer and it opens in Writer it should work in IE as well. There is one tiny difference Windows Explorer ignores the Setting for the Value "Content Type" in the registry key ".odt", but for Internet Explorer it is relevant: On my system it is: "application/vnd.oasis.opendocument.text" (Not really sure about this, it could be that the Content Type is ignored by IE as well, if the file is not served via http:, but through file:)

On second thought: The scenario that you describe sounds very much like you'd better use a Webserver with WebDAV enabled. Remember DAV stands for "Distributed Authoring and Versioning". It is not difficult to set this up, not in Internet Informaton Server and not in Apache.


I tried to add "file://///.../blah/blah/blah/..." to the link, but it still does the same thing, and it doesn't make any difference whether I use two or five backslashes after "file:" It still opens in a browser window, and then crashes.

Also, .odt, .ods, etc files are all associated with their parent programs and open in them when I click on the files in Windows explorer. My HKEY_CLASSES_ROOT entries for .ods, .odt files are the same as yours.

The server here is not really a server. It's just a central storage box for common files, and doesn't actually run any web server software. So, I don't think the option of enabling WebDAV is available. I'll look into it though.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby Zizi64 » Thu Feb 24, 2011 9:54 am

Wich browser... answer: IE...
...The server here is not really a server.


It is works me fine with Mozzilla Firefox. I tried to get a file from an another PC (Wich is in same Workgroup, and have a shared directory). We are using WinXPprofSP3 on every PC.

...And tried it with IE ver: 8.6001.18702 - I never use it otherwise - and the result was: The document open in an another browser window (after acknowledgement of a security alert.)

My suggestion:
Use Firefox!
...or ask Microsoft... :lol:
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.1; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8896
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open link to file in program, not browser

Postby boz » Thu Feb 24, 2011 1:20 pm

Zizi64 wrote:
My suggestion:
Use Firefox!
...or ask Microsoft... :lol:


Yes, Firefox may be the solution. I'll check it out. Just concerned about how it will handle all the sites that require IE add-ons and such.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby boz » Thu Feb 24, 2011 5:08 pm

Tried Firefox. It kind of solves this problem, but creates many others (eg., doesn't support add-ons for various sites, crashes when I try to run .asx playlists from a link, won't load various content on some pages). I don't mean to knock Firefox, but this isn't really the kind of solution I was looking for.

There must be another way.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: Open link to file in program, not browser

Postby Villeroy » Thu Feb 24, 2011 5:39 pm

boz wrote:There must be another way.

... and it is certainly not related to OpenOffice.org.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27869
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Open link to file in program, not browser

Postby Zizi64 » Thu Feb 24, 2011 5:46 pm

won't load various content on some pages


It is not a Mozzilla Firefox forum, but give us some details: wich add-ons missing from it?
(I can banking etc. with Firefox)
I tried play an .asx (From linked website) and it works fine for me (without any modification):
http://vntutor.blogspot.com/2008/01/how ... refox.html

And see:
http://support.mozilla.com/en-US/kb/Usi ... dia+Player
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.1; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8896
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open link to file in program, not browser

Postby rudolfo » Fri Feb 25, 2011 12:49 pm

Villeroy wrote:
boz wrote:There must be another way.

... and it is certainly not related to OpenOffice.org.


In this case it is related with OpenOffice! I have just done a test with both browsers (Firefox and IE, though both rather old versions 1.5 and 6.0). In both cases I get the typical popup box asking me what I want to do with the file: Save or Open it with OpenOffice. I am pretty sure it is related with the ActiveX Control that is installed by default. Same mechanism as the Acrobat Reader ActiveX that embeds the Acrobat into the browser window. Except for the point that the OOo ActiveX plugin is anything but stable.

ooo-custom-install.png
Custom Install Options (deselect Active X)


When you at it to change the installation, I also recommend to disable the following two options: "Windows Explorer Extension" and "Quickstarter". (Classical reasons for lots of trouble ... just search this forums to see what I mean)
OpenOffice 3.1.1 (2.4.3 until October 2009) and LibreOffice 3.3.2 on Windows 2000, AOO 3.4.1 on Windows 7
There are several macro languages in OOo, but none of them is called Visual Basic or VB(A)! Please call it OOo Basic, Star Basic or simply Basic.
rudolfo
Volunteer
 
Posts: 1488
Joined: Wed Mar 19, 2008 11:34 am
Location: Germany

Re: Open link to file in program, not browser

Postby boz » Sun Feb 27, 2011 11:28 am

rudolfo wrote:In this case it is related with OpenOffice! ...

I am pretty sure it is related with the ActiveX Control that is installed by default. Same mechanism as the Acrobat Reader ActiveX that embeds the Acrobat into the browser window.


Brilliant! You're a genius rudolfo. I also thought it had something to do with the ActiveX controls, but was trying to change the settings in IE itself. That they might be in the OpenOffice installation didn't even cross my mind. Thanks. Works perfectly now.
Open Office 3.2.1
Windows XP
boz
 
Posts: 9
Joined: Mon Feb 21, 2011 6:31 am

Re: [Solved] Open link to file in program, not browser

Postby Villeroy » Sun Feb 27, 2011 2:19 pm

Under Linux there is Tools>Options...Internet>Browser Plugin which can be turned off.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27869
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Install, Setup and Troubleshooting

Who is online

Users browsing this forum: No registered users and 3 guests