I have used the following code in the master page:
<a title="Top of page" href="#"><img src="gray_up.jpg" style="border: none; margin-right: 0px; margin-top: 0px; margin-bottom: 0px; margin-left: 10px;" border="0" />
The link works fine for topics which are under the Project Files (main) folder, but the link won't work for topics under Project Files > Sub folder. Is there any way to fix this?
Yes William, here is the code:
<a href="../#"><img alt="" src="../gray_up.jpg" title="Top of page" style="border: none;
margin-right: 0px; margin-top: 0px; margin-bottom: 0px; margin-left: 10px;" border="0" /></a>
Is there any way to change this behavior?
The problem with hyperlinks such as this in master pages is that when a topic uses the master page and it's inside a folder, the links in the master page are dutifully amended so they still work from the folder location. But as you have seen, in this case it's a bit troublesome.
Perhaps Willam can shed more light on this, as he seems to be more well versed in scripting!
Thanks a lot!
Tried that code with a liitle modification as I am trying to use gray_up.jpg:
The script works fine but now the imgae, gray_up.jpg, wont appear in the pages that are in sub folders.
I have added image as a baggage file.
For me, it's messy for sure, but the simplest approach was always to copy the image to all the folders. The only other way would be to amend your document.write code in a manner that references the image explicitly via a fully qualified URL.
Your call... Rick
Don't copy the image, instead get a link to the root of the project. And it just so happens that there is a function for that that works in WebHelp and CHM