Hi,
I am developing an WRT app using Nokia Web Developer Environment 1.0.1 and Web SDK Simulator.
I would like for user to choose from 3 text sizes (small, medium and large). I have managed to create a code that works in Web SDK Simulator but unfortunately doesn't work on the phones. I have tested it on N8, C7, X6 and N97. On the phone whichever size I choose the text is displayed in the same sizeDo you have any idea how to make this code work on the phone? Thanks
Basically I want to change the size of the font (text) while the app is running. I want to make the text inside id "Resizeable Text" big, small or medium. User can change this by picking the size from the soft key menu.
You can download this project:
http://dl.dropbox.com/u/13079791/Cha...NotWorking.wgz
Here is the code:
index.html
...
<body onload="init();">
<div id="resizeableText">
Resize me
</div>
</body>
basic.js
function init()
{
var largeFont=new MenuItem("Large",1);
var mediumFont=new MenuItem("Medium",2);
var smallFont=new MenuItem("Small",3);
smallFont.onSelect=setFontSmall;
mediumFont.onSelect=setFontMedium;
largeFont.onSelect=setFontLarge;
menu.append(largeFont);
menu.append(mediumFont);
menu.append(smallFont);
menu.showSoftkeys();
}
function setFontSmall()
{
var tekst=document.getElementById("resizeableText");
tekst.style.fontSize="x-small";
}
function setFontLarge()
{
var tekst=document.getElementById("resizeableText");
tekst.style.fontSize="x-large";
}
function setFontMedium()
{
var tekst=document.getElementById("resizeableText");
tekst.style.fontSize="medium";
}

Do you have any idea how to make this code work on the phone? Thanks
Reply With Quote

