Installing the Javascript tags was not so hard once I learned (with the help of my beloved wife) that you can do it by adding a "gadget" to your site's design. You simply create an HTML/Javascript gadget and paste the original code into it without alterations.
<div id="pregnancy-clock-div" style="position:relative; top: 0; left: 0; height: 150; width: 600;"></div>
<!-- The clock will be placed inside this container; position it where you want the clock to appear. The "id" attribute gives our code a handle to find the div when it is needed. -->
<script type="text/javascript"
src="https://sites.google.com/site/wizardclocks/special-events/pregnancy-clock/pregnancyTimeline.js?attredirects=0&d=1">
<!--
The first script tag loads the pregnancyTimeline.js code from this website.
-->
<script type="text/javascript">
createTimeline("July 27, 2011",
document.getElementById("pregnancy-clock-div"));
<!--
The second script tag calls a function defined in the first with two arguments: your baby's due date and the DIV you created to hold the clock.
-->
Once I created the gadget, I observed that it was malfunctioning; it behaved differently when it was part of a larger web page. But that will be the subject of my next post.
WC
No comments:
Post a Comment