[TxMt] Re: anchors in HTML window

Andrew Durdin adurdin at gmail.com
Sat Sep 30 10:09:52 UTC 2006


On 9/30/06, Piero D'Ancona <pierodancona at gmail.com> wrote:
>
> Let me reiterate: I create a command "prova", input=none,
> output=show as html. The text of the command is
>
> cat ~/Desktop/myFile.html
>
> The file myFile.html contains the following:
>
> <html><body>
> <a href="myFile.html#myAnchor"> Go to anchor! </a>

The HTML window is showing the output of the 'cat' command, and is
*not* reading the file itself: hence it doesn't know any filename for
the html.

Your link, however, is specifically referencing a file "myFile.html"
which the HTML window will look for in its working directory (whatever
that may be).

To get it to work, change your link to be relative to the current
document, i.e. href="#myAnchor".

Andrew



More information about the textmate mailing list