INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Run a html program off a CD:

How to run your HTML programs from a CD: by codeone
Posted: 30 Mar 03 (Edited 22 Jan 04)

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

Back to Javascript FAQ Index
Back to Javascript Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close