Software Garden wikiCalc® Program:
Details About Embedding
This page explains how to use the embeddable ".js" files that wikiCalc can create.

wikiCalc flying bird logo
INTRODUCTION

In addition to producing normal static HTML pages made up of a spreadsheet wrapped in a template, wikiCalc can also produce a ".js" file that can be "embedded" in other web pages with a simple Javascript command placed in that other page.

HOW TO DO IT

If "Publish Embeddable '.js' Version" is checked when a page is published, a copy of the newly published HTML will be saved (along with appropriate Javascript) in the HTML directory, but with the extension ".js" instead of ".html". Only the HTML of the sheet itself is saved in this version, not the surrounding template. This file may be dynamically included in any other HTML page on any web site by using HTML code such as:

<script type="text/javascript" src="http://www.domain.com/pagename.js">
</script>

An example of using this is on the Bug List page of this website. The code used there is the following:

<script type="text/javascript" src="wkcpages/buglist.js"> </script>
<noscript>
    Javascript, which is used to display the bug list embedded inside this page,
    is turned off on your browser. Access the
    <a href="wkcpages/buglist.html">bug list directly</a>.<br>
</noscript>

Note how the <noscript> text includes a link to the published HTML as an alternative.

The result of publishing a wikiCalc page is static and is not recalculated when accessed by embedding. To get up to date, recalculated values, the embeddable ".js" code can also be created by the Live View functionality. In that case, the "src" URL would be a Live View URL with "&type=js". See "Details About Live View".

If there are characters on the embedded spreadsheet that are other than the 96-ASCII graphics you may need to make sure that the page with the embedding expects the loaded Javascript to include UTF-8 characters. This can be done by including the following in the header of the page with the embedding code:

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">


(c) Copyright 2007 Software Garden, Inc.
All Rights Reserved.

wikiCalc, Software Garden, and Garden are registered trademarks of Software Garden, Inc.
Dan Bricklin's is a registered trademark of Daniel S. Bricklin.