Forum Moderators: open

Message Too Old, No Replies

Website on a CD - relative links

Help required on linking html pages problem on a CD

         

AEATConfused

4:50 pm on Jul 21, 2005 (gmt 0)

10+ Year Member



This is not as straight forward as it sounds.

I've got a few html pages on a CD, used to categorise and access some pdf's.

I can get all the links to the different pages and pdf's to work when copied to a CD and run on my computer and some others but not them all.

I've now tested six computers; both desktops and laptops, and it works on 2 out of 6 (two laptops out of three, three desktops).

The problem is when I try to click on the links. When it works, ie just follows the link - when it doesn't, ie does nothing - no loading, no "page not found 404", nothing.

It's not that all the links don't work - I can move between the different pages, (but not back to the index.html page), but I can't click into the pdf's

But this is where it gets very bizarre. I've got a link to an external website in the pages. When I click that and it goes to the website (opens up another window) and then go back into the CD html window - all the links work!

If I eject the CD and retry, but keep the external website open it still works.

I've tried both a CD writer and normal drive and that mkaes no difference. All the comps have been XP-pro. The hrefs are all usual.

Help! Please! If you need anymore info - or want to see some of the code let me know.

Thanks.

tedster

2:46 am on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, AEATConfused.

What is an example of a link that IE follows and one that is doesn't? That is, without actually using the domain name (substitute example.com as needed) what do these anchor tags look like in the source code?

AEATConfused

8:22 am on Jul 22, 2005 (gmt 0)

10+ Year Member



Hi Tedster,

Thanks for the reply. OK from the index page:
<A href="site_files/subcontractors.html"> will work and link to subcontractors.html. But from subcontractors.html, if I click on <A href="../index.html"> it wont allow me to click back to the index.html.

To use another example. I can click on <A href="site_files/environment_agency.html"> from index.html and it will go to environment_agency.html but if I click <a href="../doc_files/22.pdf" target="_blank"> from environment_agency.html it will do nothing.

Both of these will not work UNLESS that is I click an external link or open up another ie window and go to an external website - in which case the links will work.

My directory structure for those examples is:
index.html [in root dir]
site_files/subcontractors.html
doc_files/22.pdf

Thanks in advance.