Alaska Software Inc. - showing documents correctly
Username: Password:
AuthorTopic: showing documents correctly
Jeremy Suitershowing documents correctly
on Fri, 20 May 2005 09:41:37 +0100
At various points in my Intranet I can attach files that show in a new 
window when you click a view button.

Works fine with files located in the http server directories but as all the 
files are located in a maped drive on another server they don't show at all.

I've tried using the putFile() function to copy a file to the http server 
but that copies over an empty (zero byte) file.

Is there an easy way to get the files on the mapped drive to show ok?

TIA

Jeremy
Thomas Braun Re: showing documents correctly
on Fri, 20 May 2005 14:12:25 +0200
Jeremy Suiter wrote:

> At various points in my Intranet I can attach files that show in a new 
> window when you click a view button.

This new window is a web browser window? Or how do you do this exactly...?

> Works fine with files located in the http server directories but as all the 
> files are located in a maped drive on another server they don't show at all.

The drive is mapped only on the server side, not on the client I assume?

I'm not sure that I have understood what information about the files you
are showing...

So it might help to see a bit of code... or an example... or whatever 

Thomas
Jeremy SuiterRe: showing documents correctly
on Fri, 20 May 2005 14:34:13 +0100
Yup, I want to show the document in a new window.  I have a little 
javascript function that calls the window.open function to do this.

function newwindow(url)
{
new_window=window.open(url,"_blank","location=0,scrollbars=1,menubar=0,toolbar=0,status=1,resizable=1,directories=0,left=20,top=20,width=800,height=600");
}

The mapped drive is the same on the server and the client.

Files located in directories specified in the web server config work ok, 
just not on a standard mapped drive.

Jeremy

"Thomas Braun" <nospam@software-braun.de> wrote in message 
news:wrf26155dayf$.11zszcp4iulp0$.dlg@40tude.net...
> Jeremy Suiter wrote:
>
>> At various points in my Intranet I can attach files that show in a new
>> window when you click a view button.
>
> This new window is a web browser window? Or how do you do this exactly...?
>
>> Works fine with files located in the http server directories but as all 
>> the
>> files are located in a maped drive on another server they don't show at 
>> all.
>
> The drive is mapped only on the server side, not on the client I assume?
>
> I'm not sure that I have understood what information about the files you
> are showing...
>
> So it might help to see a bit of code... or an example... or whatever 
>
> Thomas
Thomas Braun Re: showing documents correctly
on Fri, 20 May 2005 16:51:21 +0200
Jeremy Suiter wrote:

> Yup, I want to show the document in a new window.  I have a little 
> javascript function that calls the window.open function to do this.
> 
> function newwindow(url)
> {
> new_window=window.open(url,"_blank","location=0,scrollbars=1,menubar=0,toolbar=0,status=1,resizable=1,directories=0,left=20,top=20,width=800,height=600");
> }
> 

In this case, the parameter url contains exactly what...
"F:\Dir\Thefile.ext" ?

Which browser are you using? IIRC, not all browsers support file type
url's. (At least a version of mozilla I once used didn't)

So if the file does not have a http://-like URL, this may cause problems.

Thomas
Jeremy SuiterRe: showing documents correctly
on Fri, 20 May 2005 16:03:04 +0100
The files are set by the user so they have the usual format you described. 
"F:\Dir\Thefile.ext"

Types can be anything but will usually be word, excel, pdf and gif/jpeg.

using IE6 as a standard browser.

Jeremy


"Thomas Braun" <nospam@software-braun.de> wrote in message 
news:16yfjoc8p1wkr$.pdb05iyy2c5x.dlg@40tude.net...
> Jeremy Suiter wrote:
>
>> Yup, I want to show the document in a new window.  I have a little
>> javascript function that calls the window.open function to do this.
>>
>> function newwindow(url)
>> {
>> new_window=window.open(url,"_blank","location=0,scrollbars=1,menubar=0,toolbar=0,status=1,resizable=1,directories=0,left=20,top=20,width=800,height=600");
>> }
>>
>
> In this case, the parameter url contains exactly what...
> "F:\Dir\Thefile.ext" ?
>
> Which browser are you using? IIRC, not all browsers support file type
> url's. (At least a version of mozilla I once used didn't)
>
> So if the file does not have a http://-like URL, this may cause problems.
>
> Thomas
Phil Ide
Re: showing documents correctly
on Fri, 20 May 2005 15:17:52 +0100
Thomas,

>> At various points in my Intranet I can attach files that show in a new 
>> window when you click a view button.
> 
> This new window is a web browser window? Or how do you do this exactly...?

<script>window.open('myfile.html')</script>

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

The sooner you make your first 5000 mistakes, the sooner you will be
able to correct them.
		-- Nicolaides
Phil Ide
Re: showing documents correctly
on Fri, 20 May 2005 15:30:19 +0100
Jeremy,

> At various points in my Intranet I can attach files that show in a new 
> window when you click a view button.
> 
> Works fine with files located in the http server directories but as all the 
> files are located in a maped drive on another server they don't show at all.
> 
> I've tried using the putFile() function to copy a file to the http server 
> but that copies over an empty (zero byte) file.
> 
> Is there an easy way to get the files on the mapped drive to show ok?

If you are using IIS, then I have absolutely no idea and no sympathy for
you (actually, I lie, I'd have LOTS of sympathy for you).

Using Apache (you might be able to do something similar in IIS) you can map
file areas outside of the web as virtual web directories.

So for example:

  c:\home\myweb\public_html - this is document root

  c:\mydocs\webvisible - I want people to download docs from here

To map the second directory into the webspace of the first in Apache, you
use the Alias directive:

Alias /webvis c:/mydocs/webvisible

Now a url like this:

  <a href="/webvis/myfile.html">myfile.html</a>

...will find c:\mydocs\webvisible\myfile.html if it exists.

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

When I get real bored, I like to drive downtown and get a great parking
spot,
then sit in my car and count how many people ask me if I'm leaving. --
Steven
Wright
Jeremy SuiterRe: showing documents correctly
on Fri, 20 May 2005 15:46:05 +0100
I've done some more testing and I think I've narrowed down some more.

The documents I'm trying to open can be of any file type (word, excel, 
gif/jpwg, pdf etc.) and it's these that are causing the problem.

I think it's something to do with how windows is interpreting how to open 
these documents.  Personally I wouldn't mind if my link opened the right 
program to display the file instead of IE as long as I can get it to open.

Jeremy

"Phil Ide" <phil@idep.org.uk> wrote in message 
news:1xgjgfugtmtep.dlg@idep.org.uk...
> Jeremy,
>
>> At various points in my Intranet I can attach files that show in a new
>> window when you click a view button.
>>
>> Works fine with files located in the http server directories but as all 
>> the
>> files are located in a maped drive on another server they don't show at 
>> all.
>>
>> I've tried using the putFile() function to copy a file to the http server
>> but that copies over an empty (zero byte) file.
>>
>> Is there an easy way to get the files on the mapped drive to show ok?
>
> If you are using IIS, then I have absolutely no idea and no sympathy for
> you (actually, I lie, I'd have LOTS of sympathy for you).
>
> Using Apache (you might be able to do something similar in IIS) you can 
> map
> file areas outside of the web as virtual web directories.
>
> So for example:
>
>  c:\home\myweb\public_html - this is document root
>
>  c:\mydocs\webvisible - I want people to download docs from here
>
> To map the second directory into the webspace of the first in Apache, you
> use the Alias directive:
>
> Alias /webvis c:/mydocs/webvisible
>
> Now a url like this:
>
>  <a href="/webvis/myfile.html">myfile.html</a>
>
> ...will find c:\mydocs\webvisible\myfile.html if it exists.
>
> Regards,
> -- 
> Phil Ide
>
> ***************************************
> * Xbase++ FAQ, Libraries and Sources: *
> * goto: http://www.idep.org.uk/xbase  *
> ***************************************
>
> When I get real bored, I like to drive downtown and get a great parking
> spot,
> then sit in my car and count how many people ask me if I'm leaving. --
> Steven
> Wright
Phil Ide
Re: showing documents correctly
on Fri, 20 May 2005 16:42:13 +0100
Jeremy,

> I've done some more testing and I think I've narrowed down some more.
> 
> The documents I'm trying to open can be of any file type (word, excel, 
> gif/jpwg, pdf etc.) and it's these that are causing the problem.
> 
> I think it's something to do with how windows is interpreting how to open 
> these documents.  Personally I wouldn't mind if my link opened the right 
> program to display the file instead of IE as long as I can get it to open.

If the users have mapped the drive to F:, then are you using a web url or a
file url?

  file:///F:/Dir/Thefile.ext

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Good day for a change of scene.  Repaper the bedroom wall.
Jeremy SuiterRe: showing documents correctly
on Fri, 20 May 2005 16:53:07 +0100
It's a straight file url like F:\dir\thefiel.ext

I've found a natty solution that someone had written in javascript that's 
solved my problem perfectly.  I'll post if anyone wants it.

Jeremy

"Phil Ide" <phil@idep.org.uk> wrote in message 
news:1unhzqzvbdwu4.dlg@idep.org.uk...
> Jeremy,
>
>> I've done some more testing and I think I've narrowed down some more.
>>
>> The documents I'm trying to open can be of any file type (word, excel,
>> gif/jpwg, pdf etc.) and it's these that are causing the problem.
>>
>> I think it's something to do with how windows is interpreting how to open
>> these documents.  Personally I wouldn't mind if my link opened the right
>> program to display the file instead of IE as long as I can get it to 
>> open.
>
> If the users have mapped the drive to F:, then are you using a web url or 
> a
> file url?
>
>  file:///F:/Dir/Thefile.ext
>
> Regards,
> -- 
> Phil Ide
>
> ***************************************
> * Xbase++ FAQ, Libraries and Sources: *
> * goto: http://www.idep.org.uk/xbase  *
> ***************************************
>
> Good day for a change of scene.  Repaper the bedroom wall.
Phil Ide
Re: showing documents correctly
on Mon, 23 May 2005 11:26:16 +0100
Jeremy,

> It's a straight file url like F:\dir\thefiel.ext

That won't work.  Instead of this:

<a href="F:\dir\thefiel.ext">The File</a>

do this:

<a href="file:///F:\dir\thefiel.ext">The File</a>

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

Once when I was in Hawaii, on the island of Kauai, I met a mysterious old
stranger. He said he was about to die and wanted to tell someone about the
treasure. I said, "Okay, as long as it's not a long story. Some of us have
a
plane to catch, you know." He stared telling hes story, about the treasure
and
his life and all, and I thought: "This story isn't too long." But then, he
kept
going, and I started thinking, "Uh-oh, this story is getting long." But
then the
story was over, and I said to myself: "You know, that story wasn't too long
after all." I forget what the story was about, but there was a good movie
on the
plane. It was a little long, though.