Solved

Windows Mobile 6.5 Internet Explorer OnKeyPress Not Exposed

Posted on 2010-09-09
13
2,198 Views
Last Modified: 2013-12-05
I have designed an ASP web page for scanning contents that go into crates, as well as the crates themselves (all are barcoded), which then inputs all of the job materials into an ERP database. It uses JavaScript to handle the onkeypress, grabs the ENTER keyCode (which is the end of the scanner's throughput), then uses AJAX to call server-side ASP code to do the database work.

It works beautifully on any desktop or laptop with an attached scanner. However, it does not work on a handheld device with Windows Mobile OS. :(

A lengthy research has verified that the onkeypress, onkeydown, onkeyup events (as well as others) are not exposed in Internet Explorer on Windows Mobile OS.

A dirty work-around is to code a setTimeout to check for value changes on the INPUT text fields (there are only 8 of them), so that is not too bad.

However, has anyone found a solution or way to expose the onkeypress/etc events and expose them to web pages in IE? (Without having to write your own WinApp browser control, turning it on in .NET, or purchase a commercial browser that does the same?)

It's a shame that Microsoft will tell you how to turn it on within your Windows Forms development (I've been to their MSDN solution page), but won't even go there regarding web pages, to the chagrin of not a few bloggers and forums.

Anyone got a rabbit in the hat on this?
0
Comment
Question by:dsacker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
13 Comments
 
LVL 24

Assisted Solution

by:alexey_gusev
alexey_gusev earned 250 total points
ID: 33638819
well, I don't know how to expose those events on mobile IE without doing anything, but some ugly workaround could be creating ActiveX control (in C++ probably) and then using it in mobile IE and firing anything from there.

I've written such controls to support signature capture in the past, so it did work with JavaScript on the page and fired custom events which JavaScript handled.

I agree it might be an overkill for your particular case :)
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 250 total points
ID: 33639547
I saw you already do some search on EE.
If googled and found this thread: http://forum.soft32.com/pda/Windows-mobile-2003-JavaScript-OnKeyPress-ftopict52557.html
0
 
LVL 20

Author Comment

by:dsacker
ID: 33642210
Alexey, yes, that's a tad much. Seems less painful is the "dirty workaround" (yep, that's the link I found, leakim971).

This is really a pain, that Microsoft would not automatically expose these events to IE, considering their OS would be used on hand-held devices (as well as phones). Seems a bit short-sighted on their part. (I know, I'm whining *lol*.)

I am looking at another possible solution, a commercial browser called "Pocket Browser" from Motorola. If this does the trick, since it's for a manufacturing company, I may go with it.

Was hoping someone has been down this road with a clean solution?
0
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33642225
have you tried other browsers like Opera?
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33642507
0
 
LVL 20

Author Comment

by:dsacker
ID: 33654665
Well, if this is any comfort to anyone (it is to me), the onChange event works, howbeit with some limitations.

The variables "this" and "event" are not available (or at least, seem to not be available) to any handler.

However, you can pass the name or id of the field your own, for example:

<input type="text" name="employee" id="employee" onChange="onChange_Click('employee');" />

Then the javascript function would be as follows:

function onChange_Click(field)

I've been able to march ahead satisfactorily on the hand-held. Also, I had to not set some of the data-wedge settings to pass the enter and/or tab keys.

Of course, I lose the ability to revalidate any field that doesn't have a value change, but it's a price I can live with.
0
 
LVL 20

Accepted Solution

by:
dsacker earned 0 total points
ID: 33654680
Well, if this is any comfort to anyone (it is to me), the onChange event works, howbeit with some limitations.

The variables "this" and "event" are not available (or at least, seem to not be available) to any handler.

However, you can pass the name or id of the field your own, for example:

<input type="text" name="employee" id="employee" onChange="onChange_Click('employee');" />

Then the javascript function would be as follows:

function onChange_Click(field)

I've been able to march ahead satisfactorily on the hand-held. Also, I had to not set some of the data-wedge settings to pass the enter and/or tab keys.

Of course, I lose the ability to revalidate any field that doesn't have a value change, but it's a price I can live with.
0
 
LVL 20

Author Comment

by:dsacker
ID: 33654681
Anyway, I'll share the points, simply for the discussion.
0
 
LVL 20

Author Comment

by:dsacker
ID: 33654725
I wish to split the points with both alexey_gusev and leakim971, while pointing to the solution I discovered as the main solution, but not sure how to do that.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33724664
Thanks for the points!
0

Featured Post

Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Configuring Remote Assistance for use with SCCM
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question