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.

Revision as of 06:02, 4 October 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Opening a web page into Web browser from Symbian Web Runtime

From Wiki
Jump to: navigation, search

This code snippet demonstrates how to open a web page into Web browser from Symbian Web Runtime.

Article Metadata
Code ExampleTested with
Devices(s): Nokia 5800 XpressMusic, Nokia 6220 Classic
Platform(s): S60 5th Edition, S60 3rd Edition FP2
S60 5th Edition
S60 3rd Edition FP2
Keywords: widget.openURL()
Created: dekuykin (26 Feb 2009)
Last edited: hamishwillee (04 Oct 2012)


Source: Relevant HTML components

<div id="bodyContent" class="bodyContent">
<label for="url">URL</label>
<input id="url" type="text" value="http://" size="16"
maxlength="256" />
<input id="openButton" type="button" value="Open"
onclick="executeSnippet();" />


// Executes the snippet.
// Loads the HTML page whose URL is entered into the widget's input label.
function executeSnippet() {
// Get the URL of the specified HTML page
var url = document.getElementById('url').value;
// Encode the URL string
var urlEncoded = encodeURI(url);
// Open the HTML page


The HTML page whose URL is entered in the widget's input label is opened in Web browser.

Supplementary material

This code snippet is part of the stub concept, which means that it has been patched on top of a template application in order to be more useful to developers. The version of the WRT stub application used as a template in this snippet is v1.1.

This page was last modified on 4 October 2012, at 06:02.
58 page views in the last 30 days.