HTML on a CD - what's the trick?

D

Dave Saville

I would like to build a complex series of web pages with a deep
directory structure and stick it on a CD. But I need the links to work
if one just double clicks the top level index - assuming that a browser
is associated with *html of course :).

What's the trick in setting up the href's?

TIA

Regards

Dave Saville

NB switch saville for nospam in address
 
R

Richard

Dave said:
I would like to build a complex series of web pages with a deep
directory structure and stick it on a CD. But I need the links to work
if one just double clicks the top level index - assuming that a browser
is associated with *html of course :).
What's the trick in setting up the href's?


Dave Saville
NB switch saville for nospam in address

Same trick as setting up the site on your local drive.
Put your main index page in the root directory, then branch off accordingly.
Your cd is nothing more than another drive.
 
J

Jochen Fuhrmann

Dave Saville said:
I would like to build a complex series of web pages with a deep
directory structure and stick it on a CD. But I need the links to work
if one just double clicks the top level index - assuming that a browser
is associated with *html of course :).

What's the trick in setting up the href's?

i don't really get you, but maybe u should use relativ paths like
index/deep/deeper/deepest.html
instead of
drive/stuff/homepage/index/deep/deeper/deepest.html
 
D

Dave Saville

i don't really get you, but maybe u should use relativ paths like
index/deep/deeper/deepest.html
instead of
drive/stuff/homepage/index/deep/deeper/deepest.html

I tried that but the browser won't let me drill down. I will read the
article someone else posted and try again.

Regards

Dave Saville

NB switch saville for nospam in address
 
P

Paul Furman

Dave said:
I tried that but the browser won't let me drill down. I will read the
article someone else posted and try again.


You might need to type
../file-in-current-folder.htm
.../file-up-one-folder.htm

I don't know why the dot-slash, it's a strict unix thing that seems
necessary in windows also sometimes... at least it doesn't hurt. Or
maybe I'm thinking of the need to type index.htm rather than just
pointing to a folder that contains a file with that default name which
usually works on a web server.

../down-one-folder/file.htm
 
D

Dave Saville

You might need to type
../file-in-current-folder.htm
.../file-up-one-folder.htm

I don't know why the dot-slash, it's a strict unix thing that seems
necessary in windows also sometimes... at least it doesn't hurt. Or
maybe I'm thinking of the need to type index.htm rather than just
pointing to a folder that contains a file with that default name which
usually works on a web server.

../down-one-folder/file.htm

I still cannot get this to work.

I have the web pages on E: Index.html is in root of E: I can open that
by
file://E:/index.html.

I have an link, href="foo/index.html" - browser will follow the link.
foo/index.html has a link of

href="foo/page.html"

The browser tries to load foo/foo/page.html

I hvae tried the links starting with just foo - foo is in the root
directory. I have tried with a slash and the browser misses the drive
out of the generated url. I have tried with ../ and that works some
places but goes wrong at deeper levels.

Problem is this is a *huge* perl program that auto builds thousands of
web pages. You have to give it two parameters. The directory to build
the pages in and the relative URL to stick on the front of the links.
It the pages work perfectly if dropped into an html directory structure
and you access via an http server. But I cannot for the life of me
figure out how to get it to work of a drive letter - that will be
chaning depending on what the CD gets assigened.

Regards

Dave Saville

NB switch saville for nospam in address
 
B

Bob Long

In Dave Saville <[email protected]> typed:

[..]
I have an link, href="foo/index.html" - browser will follow the link.
foo/index.html has a link of

href="foo/page.html"

The browser tries to load foo/foo/page.html

Correct - but not what you want, I expect! Use href="page.html"

That is, links in pages living in directory "foo" will, unless being told
otherwise, be looking for pages in "foo".
I hvae tried the links starting with just foo - foo is in the root
directory. I have tried with a slash and the browser misses the drive
out of the generated url. I have tried with ../ and that works some
places but goes wrong at deeper levels.

Problem is this is a *huge* perl program that auto builds thousands of
web pages. You have to give it two parameters. The directory to build
the pages in and the relative URL to stick on the front of the links.
It the pages work perfectly if dropped into an html directory
structure and you access via an http server. But I cannot for the
life of me
figure out how to get it to work of a drive letter - that will be
chaning depending on what the CD gets assigened.

Don't use a drive letter at all.

Bob Long
 
D

Dave Saville

Don't use a drive letter at all.

Does not work - browser refuses to do anything - tried netscape and
mozilla. I have no control over the links - I can just give it a start
string. Suppose I have the following:

root of drive:
index.html
foo
in foo:
index.html
bar
in bar index.html

I open root index html the browser will have a url like
file://e:/index.html
If I have a link /foo the browser tries to load file:///foo - and fails
If I have no prefix, ie just foo, it works but then a link from, inside
/foo/bar/index.html to say foo/index.html, will fail because it will
think foo is in bar. Remember *all* links will have the *same* suffix
string.

I need to be able to jump up and down the tree, as you would with a
browser, but I can not come up with a single pseudo url prefix that
allows this. I can't give it a prefix of file://X:/ because I don't
know what X is - whatever the CD happens to be on whatever machine.

Editing the output is a non starter because the directories nest
heavily and there are lots of pages. The last run produced in excess of
22 thousand.




Regards

Dave Saville

NB switch saville for nospam in address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,114
Latest member
GlucoPremiumReview
Top