How to use the Glow JavaScript library in a S60 WRT widget

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Created: Maveric (29 Oct 2010)
Last edited: hamishwillee (25 Jul 2012)



This article shows how to add the Glow Javascript library into your WRT widget, and interact with it. This is a basic example, where we show a greeting to the user.


  • Glow JavaScript library, you can download it from here:

The library will be included in the index.html. The result is a global object "glow", which will have all of the functions, properties and modules of the Glow library.

Example code

The example widget demonstrates first the drag & drop functionality. For the widget, default S60 WRT files are being used. You may separate the simple CSS clause in the html into basic.css if you like.

index.html - code for WRT default HTML file

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Glow JS library test widget</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="javascript" type="text/javascript" src="basic.js"></script>
<script src="/js/core.js" type="text/javascript"></script>
<link rel="stylesheet" href="basic.css" type="text/css" />
<meta name="Generator" content="Nokia WDE 3.0.0" />
<body onload="init();">
<p class="output">Hello,</p>
<p class="output">from Glow!</p>

basic.js - code for WRT default JavaScript file

function init(){
glow.ready(function() {
glow.dom.get("p").css("border", "2px dashed #CCC");
function () {

Example output

Media:glow wrt demo.jpg

This page was last modified on 25 July 2012, at 22:53.
21 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.