Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Full documentation for this library is available at the http://www.glassbox-js.com/ main site.
You can use any code editor of your choise. Notepad++ is very popular which gives syntax highlighting for most of the programing languages. This example is build with Aptana Studio and the WRT S60 plugin.
Note: Aptana has been superseded by the Nokia Web Tools, an IDE and Simulator based on Aptana and Eclipse.
A phone device supporting with Web Runtime.
For this example we will create a default WRT S60 widget, with the following 3 files namely index.html, basic.css and basic.js
<title>GlassBox in WRTS60</title>
<div id="myBox">Hello GlassBox!</div>
/* Setting background image for the page body */
/* Defining style sheet for myBox id */
font-family: verdana, arial, helvetica;
path_to_root_dir = "../"; // A local variable declared.
var myBox = new GlassBox();
myBox.init( 'myBox', '128px', '62px', 'hidden' );
myBox.apos( '170px', '150px' );