It's Sean!

UK freelance journalist, author
and copywriter Sean McManus

Printed from www.sean.co.uk. © Sean McManus.
Home > Articles > Webmaster resources > Javascript examples > Javascript includes

JSINC: Javascript include file creator

Code by Joseph K Myers. This interface by Sean McManus.

As my Javascript content syndication tutorial explains in more detail, you can use Javascript includes to syndicate your HTML content to other websites. All you need to do is write some Javascript code that outputs your HTML to the screen and save it in a .js file. The beauty of it is that sites from all over the web can embed your JS file in their websites so they can display your HTML.

If you want to syndicate your content (give your content away to other sites for promotional reasons), this is ideal, because you can update the .js file on your server and all your partner sites will immediately start displaying your updated HTML.

This page will create Javascript include files (.js files) for free. While there are plenty of commercial Javascript syndication programs available, this software is free.

Step 1: The HTML input

Paste any HTML you wish to be converted into this box.

Step 2: Name your script file

File name for the .js file which your syndication partners will link to (you can leave the default name):

Step 3: Generate code

Step 4: Create your script file

Copy the text in the box below and paste it into a new file. This is your Javascript code. Save the file as text-only and give it the name you entered in step 2 (above).

Step 5: Include code

This belongs in each of your web pages where you want to insert the contents of the HTML file. If the .js file isn't in the same folder or on the same server as the file referencing it, you'll need to add the full path before the filename. So your link partners, for example, will need to include your domain name before the filename to embed your Javascript in their pages.