cancel
Showing results for 
Search instead for 
Did you mean: 

Use Keyboard with javascript in Windows Mobile 2003

Former Member
0 Kudos

Hi,

I'm trying associate events in javascript to keyboard, but don't get work. The example above works in windows desktop with no problems, but in Windows Mobile 2003 don't...


<html>
<head>
<script language="javascript">
<!--

function exemplo()
{
	var tecla = window.event.keyCode;
	window.status = "You press : " + String.fromCharCode(tecla);
	alert("The code of keyboard key is: " + tecla);
}

document.onkeypress = exemplo;

//-->
</script>
</head>
<body>
<p align="center">Key press...::.</p>
</body>
</html>

Anyone?

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi fab,

can you try this? i don't have W2003 device so i cant test it... hope it would work.


<script for="document" event="onkeypress">
exemplo();
</script>

<script language=javascript>
function exemplo(){
 var tecla = window.event.keyCode;
 window.status = "You press : " + String.fromCharCode(tecla);
 alert("The code of keyboard key is: " + tecla);
}
</script>

regards

jo

Former Member
0 Kudos

Hi Jo,

I tested your example in W2003 and don't work... Do you have other idea?

Thanks.

Former Member
0 Kudos

hmmm.... can you try removing the <i>window.event.keyCode;</i> and just

put an alert in the exemplo() function?

jo

Former Member
0 Kudos

Hi,

AFAIK Pocket IE does not support OnKeyPress event!

Check Pocket IE reference for more info!

http://msdn2.microsoft.com/en-us/library/ms836403.aspx

Rgds Thomas

Former Member
0 Kudos

hi thomas,

we do know that some functionalities are not being supported by PocketIE, however

i couldn't find any supporting statements that it really doesn't support a specific

functionality just like this case. "it's not supported" reason is just a last resort...

from the official statement of MS:

http://msdn2.microsoft.com/en-us/library/ms838095.aspx

-

-


Microsoft Pocket Internet Explorer is updated on Pocket PC 2003

Pocket Internet Explorer has been updated to support the following:

HTML 4.01

Extensible HTML (XHTML)

Cascading style sheets

Microsoft JScript® version 5.5

Enhanced scripting and Document Object Model support

Wireless Markup Language (WML) 2.0 (XHTML + WML 1.x)

Internet Protocol version 6 (IPv6) in IPv4/IPv6 mixed-mode environments

New extensible imaging library

-

-


jo

Former Member
0 Kudos

Hi Jo/Thomas,

I think that i will to find other way to solve the client order...

Thanks for help.