Click to See Complete Forum and Search --> : c: drive installed website :: link no opens a pdf


davevarga
05-04-2007, 12:31 PM
I am developing a `help' website that for business reasons needs to be installed on user's C: drive. Strange I know....

The links from the main page link to PDF documents, that are in the same local directory as the index help page.

Click on a link located on the home page, that opens a PDF, and it does not work, here is the code: <a href="printingillustrations.pdf" target="_blank">print</a>

Yet these same files copied to a network server or to a webserver work ! That is the pdf will open when the link to it is clicked...

Any ideas?

Dave...

ryanbutler
05-04-2007, 12:35 PM
Is the PDF in the root directory of C:?

davevarga
05-04-2007, 01:34 PM
Hi Ryan,

The index.htm and the pdf file are both contained in this directory c:\xwins_guide\

Dave

sae
05-04-2007, 01:49 PM
does it work if you do the complete path?

davevarga
05-05-2007, 04:23 PM
My links were all relative before. I did try it absolute, c:\blahblah\blah.pdf and that did not work...

Any more ideas...?

Major Payne
05-05-2007, 05:04 PM
Try using something like this for file paths for local:

file:///C:/folder/filename.pdf

I may have this wrong as it's been a long time since thinking about this. LOL

Ron

davevarga
05-07-2007, 09:15 AM
OK, this is a little nuts... bear with me please. This is more complicated.

The reason the simple link is not working is that there was another problem and the `work around' I installed on the home page for fixing that problem is stopping the pdf link on the home page.

History: Because this is a locally installed website (c: drive), I had been getting warning prompts (yellow warning bar at top, 4 clicks to get through them) when I opened the local home page. Thus I added this code to the top of the webpage: <!-- saved from url=(0013)about:internet -->. That stopped the warning prompts when the home page opened up !

However since I did that, the links on the home page to the pdf stopped working.

Any ideas?

ryanbutler
05-07-2007, 12:16 PM
You shouldn't need to reference the PDF with the file/// solution. If you're linking relatively then:

If you open your browser and open index.html from C:\ then the path should look like:

C:\index.html

Any file linked in this file would look like:

<a href="myfile.html">My file descriptive text</a>

The yellow box is active content, which adding a "mark on the web" in Dreamweaver, shouldn't stop your PDF from working. Try the above file paths and see what happens. If it doesn't, you'll have to zip up your local site for us to take a look.

davevarga
05-08-2007, 09:12 AM
I keep trying to post this and this forum is not taking it !!!!!!!!!!!!!

Here is a link, please follow directions and install it locally.. I think I explained it in the web pages. This is more complex than something simple:

http://www.ibfdg.info/local/defaultnormal.htm

davevarga
05-09-2007, 11:15 AM
Shoot !

Please click on the above link to see the illustration of the problem !

Dave

davevarga
05-09-2007, 11:15 AM
Shoot !

Please click on the above link to see the illustration of the problem !

Dave

ryanbutler
05-09-2007, 05:50 PM
You didn't provide a web address for the zip file.

Major Payne
05-09-2007, 05:55 PM
This one worked for me on other page that you marked "doesn't work":

PDF (does not work)<a href="blah.pdf" target="_blank">PDF</a>

Checking others as they do not work as you indicated. I still think you have the local file path wrong for someone to access file on your PC.

Ron

Major Payne
05-09-2007, 06:39 PM
This is what I had to use to get to your page on my PC:

<a href="file:///C:\Documents and Settings\Major Ron Payne\My Documents\A] My Web Sites\PayneLessDesigns.com\ZZ] Code Help\davevarga_webdeveloper\blah.pdf" target="_blank">PDF</a>

Note that I changed file:///C:/local/blah.pd to file:///C:\local/blah.pd.

Mine is complicated, but yours will be much shorter. My path should be written:

file:///C:/Documents%20and%20Settings/Major%20Ron%20Payne/My%20Documents/A%5D%20My%20Web%20Sites/PayneLessDesigns.com/ZZ%5D%20Code%20Help/davevarga_webdeveloper/blah.pdf,

but that's a lot of work. :p This does not work in IE 7.0, but checked oki in FF.

Ron

davevarga
05-09-2007, 08:16 PM
Ron,

Yes, in trying to solve the problem created by installing locally, the workaround for it makes the launch links to pdfs not work. It should be simple... : )

Dave

......

This one worked for me on other page that you marked "doesn't work":

PDF (does not work)<a href="blah.pdf" target="_blank">PDF</a>

Checking others as they do not work as you indicated. I still think you have the local file path wrong for someone to access file on your PC.

Ron

Major Payne
05-10-2007, 02:31 AM
Ron,

Yes, in trying to solve the problem created by installing locally, the workaround for it makes the launch links to pdfs not work. It should be simple... : )

Dave

...... Yours will be simpler than mine since your path given was file:///C:/local/blah.pdf. Just change this to file:///C:\local/blah.pdf. You have one folder "local" to get to on the HD (C) before getting to the PDF. If mine works with the long path, yours will work with your short path. Just change the " / " to " \ " as indicated in post.

Ron

davevarga
05-15-2007, 01:09 PM
Hi,

The path to the pdf is correct, I double checked.

In summary, for this LOCAL INSTALLATION, the work around that stops the error messages (yellow box warning at the top) for this website that is installed on a local c: drive, prohibits the subsequent ability to launch a pdf from that page. The simple link to a pdf will not work, even a relative link in the same directory as the html page. Here are the different links I have tried:
(1) a href="blah.pdf"
(2) a href="c:\local\blah.pdf"
(3) a href="file:///C:/local/blah.pdf"
(4) a href="file:///C:\local\blah.pdf" will not work.

I am truly stumped !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Perhaps I should reframe the question to this:

How can I install a local website to a c:drive and 1) circumvent the warning messages and 2) continue to maintain proper navigation functionality including linking to pdfs? What must I do to obtain both?