I have created a phone dial pad in my WRT (if there is an better way let me know)

so the keys are layed out


I have created an onClick event for the images so I know which key is pressed.
<div onClick="javascript:keyPressed(1);return false;"><img ...></div>

This kind of works on my N97, but if I press the keys fast, I get the onclick events but always for the first key. So if I was to key in 1 then 2 then 3, I get 1,1,1 I never get the 2 or 3 onClick event.

I have tried it with DIV, A, IMG all kinds of tags but get the same results. If I click slowly I get the correct value to my onClick event.

I also find its very very slow using the HTML/WRT, Do I have to convert and write a C program?