Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ HTML/Javascript based CD Menu frontend

Posted by: tsrplatelayer Jun 26 2019, 01:48 PM

Hi
Our little society wants to give members the option of receiving a DVD of magazine back issues. There are less than 100 members and less than 100 back issue pdfs.
They take up 2 DVDs or a single 8GB memory stick.
Can anyone help me out with a simple autorun local webpage that can be stored on the DVD, or memory stick, automatically list the file names and allow the user to click on the filename to view the pdf? Either code wise or a pointer to a free app or source code.
Kind of like the CDs we got on the front of computer hobby magazines when I was young (and dinosaurs ruled the earth as my granddaughter is fond of saying). I have some (10 years ago and not since) experience with authoring in HTML and PHP - but clearly PHP is wrong in this instance.

Any help greatly appreciated.


Posted by: CharlesEF Jun 26 2019, 03:49 PM

While I think I understand what you want I don't think it is possible with HTML. Web pages can't read the local file system. If all your users use Windows then you might be able to use a '.hta' web page. HTA pages have less restrictions and you could create an ActiveX file system object to scan the CD to get the file names. But this would only work in Windows.

You could write a web page to launch each .pdf file but you would have to write the entire thing (not able to scan for files).

Posted by: pandy Jun 26 2019, 03:51 PM

Everything is on the CD/DVD, so I think it should work. It works locally, with all files on the hard drive so...

This is how auto-running a HTML file on a CD used to be done. Frankly I don't know if it's still working, but you won't lose much time trying it out. My computer doesn't even have a player, so I can't try myself.

Type the below in a plain text file (if index.html is what your html file is called).

CODE
ShellExecute=index.html


Save it as autorun.inf on the CD/DVD.

If it doesn't work and you don't find another way, you could have just the html file in the main directory and name it file_list.html or similar and put the PDFs in their own folder. Most people would click such a html file.

Posted by: Christian J Jun 26 2019, 06:47 PM

You could let PHP on your own computer generate HTML code, then manually copy that HTML to the DVD as static HTML. But it's probably no more work doing it all manually.

Posted by: pandy Jun 26 2019, 07:51 PM

Well, Windows is capable of creating a directory listing. Then it's just Find & Replace.

It may differ on different version of Windows, but on Win10 this works to get just the file names without path, size and whatnot. Bring up a command prompt in the directory with the PDFs and....

CODE
dir /b /a

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)