Hi all
I hope you can help me. I have written a small WRT launcher app, based on the code on the wiki at http://wiki.forum.nokia.com/index.ph...velopment_tips
This had a short options menu and the right softkey to call a javascript function on the website, and worked perfectly until I updated my 5800 XpressMusic to the v40 firmware last week. Now the right softkey, although retaining the label I have given it, acts as the "exit" key, while the options button only gives "exit" as an option and not my menu options.
I decided to go back to first principles, loaded Aptana onto my laptop (I'd done the original development in Notepad!), and went back to the code example on the Wiki (pasted below). And the same thing happened, the options menu doesn't show the options in the code, merely the default "exit" option.
I have played around, and found that if you comment out the "this.location.href" line then although the widget is useless as it doesn't call the web app, the options menu works fine, which points to an issue with the call to the web app, even though that worked fine previously.
I've tried this with a variety of websites so the issue wasn't with the original web app I was trying to view and so I can only assume lies within WRT.
Does anyone know what has changed to render the code example on the Wiki ineffective, and my own widget useless, please?
More importantly, does anyone know of an alternate way to call a web app within the widget (not as an external webpage within the browser)?
Many thanks!
David.
---
Code:<!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> <title>Horoscope</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> </body> <script language="JavaScript"> var CMD_BACK = 1; function onSelectedItem(command) { switch (command) { case CMD_BACK: history.back(); break; } } if (window.widget) { var timerid = setInterval(function() { if (history.length != 0) { var backMenuItem = new MenuItem("Back", CMD_BACK); backMenuItem.onSelect = onSelectedItem; window.menu.append(backMenuItem); clearInterval(timerid); } }, 1500); widget.setNavigationEnabled(true); window.menu.showSoftkeys(); } this.location.href="http://horoscope.internetdesigns.eu/"; </script> </html>

Reply With Quote

