Home > Articles > Webmaster resources > 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.

Credits

© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.

Earworm

Earworm

In this entertaining techno-thriller, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.

Scratch Homeschooling resources

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Tips, tutorials and free book chapters for Scratch, a coding language widely used in schools.

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About