| ID | Creation date | October 5, 2009 | |
| Platform | S60 5th Edition | Tested on devices | Nokia N97 |
| Category | Web Runtime (WRT) | Subcategory | UI |
| Keywords (APIs, classes, methods, functions): window.location |
If you have created a web application and want to make it a mobile application, probably the simplest way to accomplish this is to create a launcher for your webapp using WRT. This snippet shows you how to do this.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>WRT Stub</title>
</head>
<body>
</body>
<script type="text/javascript" charset="utf-8">
// Ensure that the softkeys are shown even though by default they
// should be
window.menu.showSoftkeys();
// Launch the web application
location.href = "http://url.to.your.webapp";
</script>
</html>
The web application is launched from WRT.
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 for developers. The version of the WRT stub application used as a template in this snippet is v1.2.
No related wiki articles found