Forum Moderators: open

Message Too Old, No Replies

Help with BASE tags

HTML demo I put on CD resolves links to hard drive :(

         

Yogibear

4:17 am on Dec 13, 2001 (gmt 0)

10+ Year Member



I have set up a demo 100megs long to reside
on CD.
The top window is a frame set consisting of
4 template frames.
In Javascript I capture the drive letter from document.location and express Javascript
generated HTML relative to
file:///DRIVE ¦ /subdirectory/file.htm

I burned a CD and both Netscape and IE attempt to resolve the 4 template frames relative to the C drive :(:(:( and evrything screws up :P .

I tried putting a BASE tag in my frame definition HTML file of ...
file:///C¦/framestruct.HTM
..and the browser says unable to find file
or directory named
/C¦/framestruct.HTM

Please help Ive spent *forever* doing this
demo and I dont think I can see the wood
for the trees any more...
Thanks

Laisha

5:02 am on Dec 13, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what you're using, but it appears to be your editor causing the problem. If you can, you want to do a Find/Replace on all pages like this example:

For those that say file:///DRIVE ¦ /subdirectory/file.htm
Find: file:///DRIVE ¦/
Replace with: ./
Or with nothing at all.

and this:

For those that say file:///C¦/framestruct.HTM
Find: file:///C¦/framestruct.HTM
Replace with: ./
Or with nothing at all.

Then go to bed! :)

I hope that makes sense. It's late...

Yogibear

11:04 am on Dec 13, 2001 (gmt 0)

10+ Year Member



Thanks but its not an editing problem.
By default, all URLs within a doc are relative to the base URL of the doc. containing them, unless otherwise stated.
You cant hard code a BASE HREF onto CD, what would happen if the user inserted the CD containing the HTML in network drive H for example? .

diddlydazz

11:07 am on Dec 13, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think what laisha means is enter :

.//frameset.htm

instead of

c:/???????'