jsFileMaker v1.2

jsFileMaker is a Javascript external file creator that will take an HTML page or plain text page and create a .js file.  External files can be created from a whole page, a selected portion or the body of a page.  The calling html page is also created.

The .js file can be 'squeezed' by taking out extraneous space so reducing download times.  The external file can use either 'write' or 'writeln'.  Which you use (and whether or not the file has been "squeezed") can make a significant difference in the outcome and depends on the file content.  

HTML can be shown as text by selecting 'Force HTML as text'.  Text files are processed differently from HTML files so don't select an HTML file from the text file select dialog!

Having created the external file, the required calling HTML page is created in the lower half of the screen.  This shows an example HTML calling page.  Should you want to call in a 'snippet' to a page, place the following in the page body where you want it to be.

<SCRIPT LANGUAGE = "JavaScript" SRC = "myfile.js" type="text/javascript"></SCRIPT>

You could also, for example use "function header() {... }" around a section of the .js file and do something like this in the main page where functions in the .js file are called on loading:

<HTML><HEAD>
<SCRIPT LANGUAGE = "JavaScript" SRC = "myfile.js" type="text/javascript"></SCRIPT>
</HEAD><BODY onload="header();middle();footer()">
</BODY></HTML>

**If you choose to use the body of an HTML page or a selected section, the required calling HTML page will be created including the rest of the original file so the page shows complete.

Using jsFileMaker:

Select either an HTML or TXT file.
Make required selections.
Create .js file.
Save .js file.
Test .js file.
You can reopen a .js file for editing.
You can run the original file to compare the output.
You can squeeze the original html file.

**You can test the .js file without saving which will create 'demo.html' and 'temp.js' in the folder of the original file.

You can right click on either section to use Cut/Paste etc and change fonts.

Changes since v1.1:
Minor changes to operation and ability to change fonts.

Installing jsFileMaker:
Extract both files to a folder of your choice.

Uninstalling jsFileMaker:
Simply delete both files and the folder.  If you have tested without saving you will have created 'demo.html' and 'temp.js' files in the original file folders.  These are not deleted by the program.

I'm not a javascript programmer so this may NOT always work as expected!  I have found that a page containing <SCRIPT> tags doesn't always work as expected and that some times the page has to be refreshed after loading to get some javascript functions to work.  I have also found that generally it's better to stick functions in an external file rather than leave them in the page.  It depends on what you do with and how you call the include file!  If you didn't know, an external file can't be used with SSI.  I didn't and spent ages trying to get it to work!!
 
If there is a javascript programmer out there interested in developing this further or resolving any bugs, I'd appreciate their input. I have no intention of making this program other than FREEWARE so there is unlikely to be any money in it!

LEGAL DISCLAMER
THIS SOFTWARE IS PROVIDED SOLELY AS-IS AND WITHOUT WARRANTY INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.  THE USER AGREES TO INDEMNIFY AND HOLD THE AUTHOR HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS ARISING FROM OR RELATED TO USE OF THE PRODUCT.

   If you don't agree, don't use it!

   This software is FREEWARE and permission is granted for anyone to use this software for their own personal use.  Though FREEWARE the author retains copyright of the code and authority should be sought to include it in any library offered to the public.

  If you have questions, suggestions or advice please mail me.

  Written by Brian Shepherd (brian@boxnumber1.com) Nov 2002-June 2003

