Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to formulate a web link to a Word document on a Windows server

Posted on 2011-02-15
5
762 Views
Last Modified: 2012-05-11
In a corporate environment, I want to create a web link to open a Word document. The document resides on a common drive on Windows file server.

So the document resides (for everyone) on R:\ftp\prod\edw\reports\cdr_2011_01_03.doc

My link works fine and the document opens but the actual link when hovering the mouse is

file:///R:/ftp/prod/edw/reports/cdr_2011_01_03.doc

This looks kind of cheesy with the "file:///" so can I do something to clean this up ? Even as is, I assume it will work for everyone because the "R:\" is common to all (including on Citrix)
0
Comment
Question by:Alaska Cowboy
  • 2
  • 2
5 Comments
 
LVL 15

Accepted Solution

by:
Tomarse111 earned 75 total points
ID: 34898429
Best would be to create virtual directory through your IIS (or similar web server) to point the 'reports' part of your directory.

This would then be

http://www.yoursite.com/report/cdr_2011_01_03.doc

As you can see look nicer. This will only work though if your web server has access to the report directory ...
0
 
LVL 12

Assisted Solution

by:Amick
Amick earned 50 total points
ID: 34898518
There's nothing wrong with that link, it is a valid URL.
You could create a .html page and use a Meta refresh
<html>
<head>
<meta http-equiv="Refresh" content="0;url=file:///R:/ftp/prod/edw/reports/cdr_2011_01_03.doc" />
</head>
<body>
</body>
</html>

Open in new window

or you could create a server side redirect, but it really isn't necessary.
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 34898771
Tomarse, thanks.

I didn't indicate that the document is created on Unix, then I copy it to a Windows drive mounted on Unix. My webserver is just PC running Tomcat.

Amick, thanks, what does the auto refresh do ?

My website URL is http://xpc-120268/edw/dailyProcessingStatus.htm?filter=claim&DATE=02142011

I created a shortcut on my PC that to the "R:\" drive, but would my "EAR" file (from Rad-7) recognize this ?

Then my link would just be coded as reports/filename.doc which would be a shortcut to "R:\" drive.
0
 
LVL 12

Expert Comment

by:Amick
ID: 34937790
You asked what the auto refresh does. It simply reloads a page after the number of seconds given in the content parameter. If a value is assigned to the url parameter, that is the url that is loaded.  The combination of the two enables the webpage creator to redirect a user elsewhere without their intervention.  One problem with this method of redirection is that it breaks the back button.  When users are redirected and then use the back button, they return to the page that originally redirected them.  Logically, they are redirected again thus are returned to the page they're trying to leave. A user can overcome this by using the history dropdown, but it is an annoyance that one should consider when deciding whether this is an appropriate method to use for redirection.

A client-side option that I didn't mention earlier is to use a frame.  This allows you to load the awkward URL without breaking the back button. Here's an example:
 
<html>
 <head>
 <title>REPORT</title>
 <frameset cols = "100%">
 <frame src="file:///R:/ftp/prod/edw/reports/cdr_2011_01_03.doc" />
 </frameset>
 </head>
 <body>
 </body>
 </html>
 

Open in new window

You should be aware that frames are deprecated in XHTML.

The server-side options are generally preferable, but the client-side options have their place and a knowledgeable webmaster will consider the benefits of each method before choosing a tool.
0
 
LVL 1

Author Comment

by:Alaska Cowboy
ID: 34947318
Amick, thanks for the follow-up explanation.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question