e-Book Design Tips
avoiding link path problems

 

Avoiding Link Path Problems

HTML includes a number of tags where one file contains a reference to another file. Some of these include:
  • The HTML Anchor Tag, used to add hyperlinks between pages.

    Example:

    <A HREF="page2.htm">Page 2</A>
    The above is a hyperlink that goes from the current file, to another file, in this case, one called page2.htm

  • The SRC= parameter used in the HTML IMG tag (to display images), and BACKGROUND= which can be used in various TABLE tags and the BODY tag (used to set the background for the table or entire page)

    Examples:

    <IMG SRC="picture.jpg">

    <TABLE COLS="1" CELLPADDING="0" CELLSPACING="0" BORDER="0" RULES="NONE" BACKGROUND="picture.jpg">

    <BODY BACKGROUND="picture.jpg">
  • Various other tags which reference another file, such as the SRC= attribute in the FRAME and IFRAME tags (used to say which file will be loaded into a frame), the SRC= attribute in the SCRIPT tag (used to give the name of a file containing script code), and many other tags too.
In all the above examples, the code is correct, and will work both in e-books (created for example with Activ E-Book Compiler) or in web sites, provided the file containing the HTML fragment and the file being referenced are placed in the same folder.


But will your HTML editor get in right?

All the above is fine and dandy, you insert the code, put the files in the right place, and hey presto everything is working.

Unfortunately some HTML editor programs (including some of the brand name HTML editors) have a tendency to code these references to other files in an incorrect way. Rather than just inserting the file name, they can insert a reference to a specific folder on your computer.

Examples of errors (there are many other possible variations):

<A HREF="file:///c:/workingfolder/page2.htm">Page 2</A>

<A HREF="c:\workingfolder\page2.htm">Page 2</A>

<IMG SRC="file:///c:/workingfolder/picture.jpg">

<IMG SRC="c:\workingfolder\picture.jpg">
This type of incorrect HTML code can cause major confusion for both e-book and web site authors.


Web Site Problems Caused By This

When you view your web pages on your computer, everything seems to work, at least more or less. The links seem to go to the right page (provided you don't look at the browser address bar too closely), and the images are present.

However, the only reason this type of code might seem to work is that you have the files in the particular named folder on your computer. When somebody else views your web site, they will experience missing images, broken links, etc.


E-Book Problems Caused By This

When you view your e-book pages on your computer, once again everything seems to work at least more or less.

If you look closely you may spot some problems:
  • The Next and Previous buttons (if enabled) in Activ E-Book Compiler won't work after following one of these incorrectly coded links.

  • Activ E-Book Compiler's PreProcessor and Rebrander may seem as if they are not operating correctly.

  • The Status Bar and Tooltips which give destination information about where links lead, can give incorrect or confusing results.
Why? Because after following one of the incorrectly coded links, you aren't viewing pages inside the e-book any more, but instead are viewing the files from your working HTML folder ("source folder").

Worse yet, if somebody else views an e-book containing one of these incorrectly coded links, they will experience missing images, broken links etc. Because, as with the web site example, their computer won't have the same named folder containing HTML files as yours does.


It's Easy To Fix

At the most basic level the solution is simple: Remove the path information which references particular named folders from your HTML files, then re-upload your web pages, or re-Build your e-book.

Examples:
  1. Change
    <A HREF="file:///c:/workingfolder/page2.htm">Page 2</A>
    to
    <A HREF="page2.htm">Page 2</A>
  2. Change
    <A HREF="c:\workingfolder\page2.htm">Page 2</A>
    to
    <A HREF="page2.htm">Page 2</A>
  3. Change
    <IMG SRC="file:///c:/workingfolder/picture.jpg">
    to
    <IMG SRC="picture.jpg">
  4. Change
    <IMG SRC="c:\workingfolder\picture.jpg">
    to
    <IMG SRC="picture.jpg">
If you have a good search utility (at a pinch you can use Find on the Windows' Start menu), it's easy to locate which of your files, if any, have this type of HTML coding problem. Do a search of all files in your working folder ("source folder") for file:, and then another search for C: (or D: if you work on the D: drive etc.). If either of these searches find a match, you might have this problem...

Once you've located the problem files, load up each candidate HTML file in a plain text editor (such as DOS EDIT or Notepad) and use the Find option to locate the problematic code, make the change, and you're done.





 

Home: eBook Code
Design Tips
Scripts
Templates/Translations



Other Sites about eBooks

EBookApprentice.com
Learn about eBook publishing

EBookCompiler.com
Software to create your own eBooks

CoverFactory.com
Create eBook Covers with ease

EBookPower.com
Add multimedia to your eBooks

EBookFriends.com
Discuss eBooks

EBookInterviews.com
Read about other eBook authors' experiences

EBookSubmit.com
Learn about eBook marketing

EBookJungle.com
Searchable directory of eBooks



Related Links

Affiliate Programs
Affiliate Marketing Downloads
Affiliate Marketing eBooks
Affiliate Program Reviews

eBook Authoring
eBook Authoring Downloads
eBooks for eBook Authors
eBook Compiler Software
eBook Cover Creation
eBook Cover Software

Marketing
Ezine Guide
Increase Website Traffic
Internet Marketing Guide
Internet Marketing Help
Press Release Guide

Search Engines
SEO Guide
SEO Tools

Your Site
Adobe Dreamweaver
Adobe Dreamweaver Tutorials
Accept Credit Cards
Domain Names
Web Design eBooks
Web Design Tools
Web Hosting
Web Hosting Directory
Webmaster Tools Directory

 

   
Disclosure: Advertising Link(s): Our company may receive a payment if you purchase a product/service after following this link.

Disclosure: Our company's websites' content (including this website's content) includes advertisements for our own company's websites, products, and services, and for other organization's websites, products, and services. In the case of links to other organization's websites, our company may receive a payment, (1) if you purchase products or services, or (2) if you sign-up for third party offers, after following links from this website. Unless specifically otherwise stated, information about other organization's products and services, is based on information provided by that organization, the product/service vendor, and/or publicly available information - and should not be taken to mean that we have used the product/service in question. Additionally, our company's websites contain some adverts which we are paid to display, but whose content is not selected by us, such as Google AdSense ads. For more detailed information, please see Advertising/Endorsements Disclosures

Our sites use cookies, some of which may already be set on your computer. Use of our site constitutes consent for this. For details, please see Privacy.

Click privacy for information about our company's privacy, data collection and data retention policies, and your rights.

CERTAIN CONTENT THAT APPEARS ON THIS SITE COMES FROM AMAZON SERVICES LLC. THIS CONTENT IS PROVIDED \'AS IS\' AND IS SUBJECT TO CHANGE OR REMOVAL AT ANY TIME.
CERTAIN CONTENT THAT APPEARS ON THIS SITE,COMES FROM AMAZON EU S.à r.l. THIS CONTENT IS PROVIDED \'AS IS\' AND IS SUBJECT TO CHANGE OR REMOVAL AT ANY TIME.

In Association With Amazon.com
Answers 2000 Limited is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.
In Association With Amazon.co.uk
Answers 2000 Limited is a participant in the Amazon EU Associates Programme, an affiliate advertising programme designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.co.uk.
As an Amazon Associate, our company earns from qualifying purchases. Amazon, the Amazon logo, Endless, and the Endless logo are trademarks of Amazon.com, Inc. or its affiliates.



Contact Us     About/Terms Of Use     Privacy     Site Map     Advertising/Endorsements Disclosures

Copyright © 2002-2020, Answers 2000 Limited