Thanks Mike, I'll try that next time I'm at the client's place of business, 
after making sure I can get it working localhost. I do have a question about it 
though: I'm never clear when to use forward slashes vs. backslashes, but I do 
know that in writing web apps I've had much better luck with forward slashes. 
So by \\servername\sharename did you mean //servername/sharename?

Cameron, there was at most one CF error message - the 'file doesn't exist 
message', though to be honest, I have only my notes, and my memory no longer 
enables me to visualize that message precisely. Three of the other messages 
were from the broswer: 'Page cannot be displayed', 'Firefox can't establish a 
connection to the server at dsm-svr1-asc', and 'Firefox doesnot know how to 
open this address because the protocol(J) isn't associated with any program'. 
The other message, 'Member not found', was also a browser message, though of a 
different sort: it presented itself as a javascript error message, namely the 
little yellow exclamation point icon in the lower lefthand corner of the page 
that one must click to open a window giving no more than a cryptic message 
describing what's wrong, which as you know is a big reason for developing in FF 
instead of IE.

(Importantly, although it is irrelevant to the present issue, for my particular 
web app IE is a far superior choice for production, so in retrospect I'm glad 
that my client insisted upon it. The reason is that this app makes heavy use of 
'innerHTML = innerHTML + new_stuff' to enable users to fill in a record 
template on the screen, then press a button to add another record template to 
the screen, which they can then fill in, and so on, before finally pressing a 
button to save them all. FF ignores user keystrokes in determining the initial 
value of innerHTML, so if users had to go with FF, they would have to add the 
right number of record templates to the screen before filling them in - quite a 
nuisance. IE, on the other hand, does take account of user keystrokes in 
determining the value of innerHTML, so with IE the app works as intended. 

The downside of IE is that it does not interpret a backspace as a keypress, so 
that backspaces do not fire the onkeypress event - which I need to enable the 
Save button. FF does interpret backspaces as keypresses. But on balance, for 
purposes of this app, the IE implementation turns out to be much better than 
the choices made by FF.)

-----Original Message-----
>From: Mike Staver <[EMAIL PROTECTED]>
>Sent: Apr 24, 2008 3:29 PM
>To: [email protected]
>Subject: Re: [ACFUG Discuss] How Load Files from Outside the Web Directory?
>
>Just off the top of my head and after a quick scan of your email here, I
>would suggest using cffile.  Is it possible to use it copy the file into a
>loadable directory, atleast temporarily? I would think that no matter
>what, you won't want to throw up files on your site from a directory that
>is not meant to be public.  I would think you'd be in for a world of hurt
>if somebody is able to comprimise the machine that way... Another option
>is mounting another disk inside the wwwroot folder. Very easy in linux
>land with fstab, but in windows it's a little more obscure, but possible.
>also, I wouldn't use J: or something like it - I would try using cffile
>with the \\servername\sharename type of naming convention...
>
>>
>> Hello. My site needs to load PDFs which are located in a different
>> directory (in fact, on a different disk drive) than the one on which the
>> site's web pages reside. In developing this by working as localhost on my
>> own desktop PC at home, the following code works flawlessly:
>>
>> <cfcontent file = 'D:/Styles/553/55303.pdf'>
>>
>> where the web page containing the above line of code, and everything else
>> in the site, is on a subdirectory of C:/Inetpub/wwwroot/. Also, in real
>> life the parameter 'D:/Styles/553/55303.pdf' is a #variable# which can
>> evaluate to that path among others; I'm hard-coding it here to simplify
>> the example.
>>
>> My problem is that this must work on a network where the target is in a
>> virtual directory on a different box. Since that virtual directory
>> presents itself to us humans as drive J, the value of the file attribute
>> in the above <cfcontent> tag should presumably be 'J:/553/55303.pdf'. But
>> when I plug 'J:/553/55303.pdf' into the above tag, both Firefox(FF) and
>> Internet Explorer(IE) complain that the file does not exist.
>>
>> A different approach is suggested by the fact that Windows Explorer (a.k.a
>> 'My Computer') shows the 'real(?), or underlying(?) location corresponding
>> to virtual drive J to be "Styles on  'dsm=svr1-acr'". The Help desk at
>> Leapfrog (the company which built my client's network) suggested that I
>> use '//dsm-svr1-acr/553/55303.pdf' instead of 'J:/553/55303.pdf'. But when
>> I try that, FF says it 'can't establish a connection to the server at
>> dsm-svr1-acr'; and IE says 'Page cannot be displayed'.
>>
>> The third method I tried was to use <cflocation> istead of <cfcontent>, as
>> below:
>>
>> <cflocation url="J:/553/55303.pdf">.
>>
>> I would assume <cflocation> should be equivalent to the <cfcontent> tag in
>> this situation since, based on the Livedocs, the difference between the
>> two seems to be only that <cfcontent> provides extra capabilities such as
>> specifying the MIME type, loading from a variable instead of a file, and
>> deleting the file after its contents are loaded to the page; and none of
>> those capabilities are needed here. Is that right?
>>
>> In any case, when I try the code with <cflocation> as above, sometimes the
>> PDF is loaded or failure. When it does not work, FF sometimes interprets
>> the letter J as a protocol, and reports that it 'doesn't know how to open
>> this address because the protocol (J) isn't associated with any program'.
>> At other times it simply loads a blank page with no error message (based
>> on my notes, this seems to depend on whether the value of the url
>> attribute was substituted vs. hard-coded but I'm not sure of this). As to
>> IE, when the <cflocation> method does not work, I get a javascript message
>> saying 'Error: Member not found' (I neglected to mention that the page
>> containing the <cfcontent> or <cflocation> tag is actually loaded to a
>> child window via the javascript code:
>>
>>    win=window.open:
>> (showpdf,'Style','width=800,height=500,resizable=yes'),
>>
>> where shopdf evaluates to the url of the page containing the <cfcontent>
>> or <cflocation> tag, with the path to the file as part of its query
>> string.
>>
>> Can anyone shed light on what's happening here, and what I should be doing
>> to make this work?
>>
>> Thanks,
>>
>> Peyton
>>
>>
>>
>>
>> -------------------------------------------------------------
>> Annual Sponsor FigLeaf Software - http://www.figleaf.com
>>
>> To unsubscribe from this list, manage your profile @
>> http://www.acfug.org?fa=login.edituserform
>>
>> For more info, see http://www.acfug.org/mailinglists
>> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
>> List hosted by http://www.fusionlink.com
>> -------------------------------------------------------------
>>
>>
>>
>
>
>
>-------------------------------------------------------------
>Annual Sponsor FigLeaf Software - http://www.figleaf.com
>
>To unsubscribe from this list, manage your profile @ 
>http://www.acfug.org?fa=login.edituserform
>
>For more info, see http://www.acfug.org/mailinglists
>Archive @ http://www.mail-archive.com/discussion%40acfug.org/
>List hosted by http://www.fusionlink.com
>-------------------------------------------------------------
>
>
>



-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to