help with relative links please

liunx

Guest
I am using MS Word to devolop an HTML document on a CD, which will have links to other documents on the CD. To write this and test it out, I saved documents to a R/W CD (drive H) and am writing a document with a little explanation and links to the others previously saved. Using Word, on the command bar under 'view' I select HTML Source, and the Microsoft Development Environment window appears with the source code.<br />
<br />
When I add the following line to link to another document (correct according to my book):<br />
<br />
<li><a href=http://www.htmlforums.com/archive/index.php/"which suit to respond.htm">which suit to respond</a></li><br />
<br />
and save in the MDE window, I get a blue link in the document, which correctly links to the saved document, but the line I entered is changed to:-<br />
<br />
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;<br />
mso-list:l0 level1 lfo1;tab-stops:list 36.0pt'><a<br />
href=http://www.htmlforums.com/archive/index.php/"file:///H:/which%20suit%20to%20respond.htm">which suit to respond</a></li><br />
<br />
I guess the MDE editor knows what it is doing, as it seems to work, but what concerns me is the change in the partial URL, that references my drive H:. When I burn this onto CD and someone puts it in their drive D:, will the link still work??<br />
<br />
thanks muchly in advance,<br />
John<!--content-->This is just my personal opion and may not matter but anyways...<br />
<br />
Word is one of the worst things to use to create a web page document. One of its habits is like you mentioned... it changes your coding to suit its own needs. Thus will create further problems such as your goal. This here...<br />
file:///H:/which%20suit%20to%20respond.htm<br />
is an abosolute value instead of a relative one. Put that onto a different place such as a CD and it will always look for H drive for the file. What if there is no H drive on the users computer? And if they do, who's to say that is where the file will actually be found?<br />
<br />
The other problem that may occur is the use of spaces in your filename. The %20 represents spaces and that's OK, but some browers may have problems rendering it. Its best to use a full word for the name or at least use underscore characters instead of spaces.<br />
whichsuittorespond.htm<br />
which_suite_to_respond.htm<br />
<br />
If any of that is relavent will depend on your point of view :)<!--content-->You seem to know enough of absolute and relative URLs to be properly worried. You know very well those paths will never work on anyone else's computer. You need to break down to reality, MS Word is not a web page maker. <br />
<br />
Worst case scenario, after you've created all your HTML files, open them manually in Notepad (SHIFT + RIGHT-CLICK on file, OPEN WITH...) and fix the URLs yourself.<br />
<br />
However I'd highly recommend finding a program that's actually meant for web pages. DreamWeaver (<!-- w --><a class="postlink" href="http://www.macromedia.com/software/dreamweaver">www.macromedia.com/software/dreamweaver</a><!-- w -->) would be an expensive example. Perhaps a free HTML editor, like 1st Page (<!-- m --><a class="postlink" href="http://evrsoft.com/1stpage/">http://evrsoft.com/1stpage/</a><!-- m -->)? I haven't used it, but I've heard good things about it. <br />
<br />
And please, stay away from Microsoft's FrontPage (<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&postid=69197#post69197">http://www.htmlforums.com/showthread.ph ... #post69197</a><!-- m -->)... It has the same problem... Atleast in v2000.<!--content-->Thanks for the feedback all.<br />
<br />
John<!--content-->
 
Back
Top