Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run your HTML programs from a CD:

Run a html program off a CD:

How to run your HTML programs from a CD:

by  codeone  Posted    (Edited  )
How to run your HTML programs from a CD:

1. What to do.
2. The code.
3. Conclusion.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

1. What to do.

Well the first thing to do is to make an onload() script
which redirects you to your start page. I'll show
you how to do that below.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

2. The code.

First you have to link all your pics and sounds to
the CD ROM drive in my case itÆs E:. Ok so
now that we have done that we should make
sure we linked all if any programs we have
to the CD ROM drive as well.

Your links should look something like this:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<a href="E:\folder\pic.bmp"></a>

for programs:

<a href="E:\folder\program.exe"></a>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

See how I used the CD ROM drive at the
beginning? That is were your Hard drive will
look for your pics or sounds. Make sure
that you include the entire directory or
it wont work.

OK. . . so now that you have your files
linked to the CD-ROM drive you are ready to make
your run program. This is the HTML file
that we will use to start up our pages.
This file is going to be quite small and a
big difference from 1MB, etc. This will be the
file you will compress on the CD and extract.
The rest of the files and folders will be
left on the CD.

Here's the code for the run CD:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<HTML>
<head>
<title><title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
redirTime = "0";
redirURL = "E:/your folder/your page.htm";
function redirTimer() { self.setTimeout
("self.location.href = redirURL;",redirTime)
; }
// End -->
</script>
</head>
<body onLoad="redirTimer()">
</body>
</HTML>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Now, render it as an .HTM or .HTML file and
save it within the root directory of the program.
Go into your program's root directory and compress
this file, because this is the file you will
download onto your computer, and this file
will be the one that accesses your main page
which will be on your CD. Now just open up
your favorite CD renderer and burn it to CD-R.

Once your CD is done it is ready to run!!!!!

Now open the CD and extract the compressed "run" file
you made to the desktop or somewhere easy to find.
Click the icon and see if it works, if it does, good
work, if it doesn't try again...

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

3. Conclusion.

I hope this tutorial helps you guys out and
lets you find an alternative to the .exe file
which hardly works. Thanks for reading and
don't forget to rate this FAQ. ;)

Regards,

-Code One

Updated: 1-22-2004
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top