View Full Version : js apple timer widget

07-28-2012, 06:26 AM
How do I put a javascript widget in an html file?

Here's what i have put in to the .html, and it doesn't show up.
Does this code look like a typical way to put in a .js widget in an html file?

<script type="text/javascript" src="Scripts/Widgets/Timer/TimerWidget.js"></script>
<script type="text/javascript" src="Scripts/Widgets/Timer/localizedStrings.js"></script>

07-28-2012, 04:55 PM

Does this look more familiar? Here's what I have in the <body> section of my code:

<script type="text/javascript">
new TimerWidget('widget1', 'Scripts/Widgets/Timer', 'Scripts/Widgets/SharedResources', '.', {
"type": 0,
"labelsEnabled": 1,
"labelFontFactor": 1.2,
"labelFontSize": 10,
"unitsRange": {
"location": 1,
"length": 4
"target": 1348869800000