473,385 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with Focus method with iehp.exe on thin client

The HP t5520 Windows CE based thin client comes with a browser called
'Internet Explorer' - iehp.exe. It appears to have Java script
(Request.Browser.JavaScript = True). I want to use this browser in
conjunction with a 'keyboard wedge' magnetic card reader (and no keyboard) to
record the arrival of staff and to display information about the employees
jobs for the day. The webform has a textbox that must maintain focus so that
when a magnetic card is swiped, the card details are recorded and the form
submitted. Page_Load has textbox1.Focus which does the job fine in IE7, but
does not work with hpie.exe (Request.Browser.Type="Mozilla"). I know nothing
about Java script or how .Focus works. Is there any way of fixing this
problem, or is there a Windows CE browser that would make .Focus work?
--
John Austin
Apr 10 '07 #1
6 2203
Try this and let me know what it does:

http://www.ben-rush.net/blog/PermaLi...d8c499a&dotnet

If JavaScript is truly enabled, then something like that should work for
you.

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"John Austin" <Jo*********@nospam.nospamwrote in message
news:3A**********************************@microsof t.com...
The HP t5520 Windows CE based thin client comes with a browser called
'Internet Explorer' - iehp.exe. It appears to have Java script
(Request.Browser.JavaScript = True). I want to use this browser in
conjunction with a 'keyboard wedge' magnetic card reader (and no keyboard)
to
record the arrival of staff and to display information about the employees
jobs for the day. The webform has a textbox that must maintain focus so
that
when a magnetic card is swiped, the card details are recorded and the form
submitted. Page_Load has textbox1.Focus which does the job fine in IE7,
but
does not work with hpie.exe (Request.Browser.Type="Mozilla"). I know
nothing
about Java script or how .Focus works. Is there any way of fixing this
problem, or is there a Windows CE browser that would make .Focus work?
--
John Austin

Apr 11 '07 #2
Hi John,

As Ben has said, you can simply test the setfocus behavior through pure
javascript function call rather than the ASP.NET Page.Setfocus method.
ASP.NET server-side page/control method also emit client-side script to
setfocus. If pure client script also not work, I'm afraid the problem
should be specific to the iehp.exe browser:

#Set Focus to First Input on Web Page
http://www.codeproject.com/jscript/FocusFirstInput.asp
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.


Apr 11 '07 #3
Hi Ben,

Thanks for the help - your sample code works fine. Also pasting the
id="Body" onload="document.form1.txtCardID.focus();"
into my existing page makes it work too.

I know nothing about Java script, so why does your 'onload' work and
Microsoft's
<form id="form1" runat="server" defaultfocus="txtCardID">
not work?

--
John Austin
"Ben Rush" wrote:
Try this and let me know what it does:

http://www.ben-rush.net/blog/PermaLi...d8c499a&dotnet

If JavaScript is truly enabled, then something like that should work for
you.

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"John Austin" <Jo*********@nospam.nospamwrote in message
news:3A**********************************@microsof t.com...
The HP t5520 Windows CE based thin client comes with a browser called
'Internet Explorer' - iehp.exe. It appears to have Java script
(Request.Browser.JavaScript = True). I want to use this browser in
conjunction with a 'keyboard wedge' magnetic card reader (and no keyboard)
to
record the arrival of staff and to display information about the employees
jobs for the day. The webform has a textbox that must maintain focus so
that
when a magnetic card is swiped, the card details are recorded and the form
submitted. Page_Load has textbox1.Focus which does the job fine in IE7,
but
does not work with hpie.exe (Request.Browser.Type="Mozilla"). I know
nothing
about Java script or how .Focus works. Is there any way of fixing this
problem, or is there a Windows CE browser that would make .Focus work?
--
John Austin


Apr 12 '07 #4
Hi Ben,

The "defaultfocus" is an ASP.NET server-side control attribute, the ASP.NET
runtime will render out clientscript (to set focus) according to this
attribute value. However, the rendering will vary according to the client
browser. I think ASP.NET possibly detect the iehp.exe as a non-javascript
enabled browser and doesn't correctly output script to set focus.

<form id="form1" runat="server" defaultfocus="txtCardID">

You can try checking the source of the output html at client-side to see
whether the ASP.NET has render the same script code as your own custom
script.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 13 '07 #5
Hello Stevan,

Request.Browser.JavaScript = True, so it ought to think that the browser
supports Java script. Can you tell me where I could download a copy of
Microsoft's Internet Explorer for Windows CE? I cant find a download anywhere.
Thanks
--
John Austin
"Steven Cheng[MSFT]" wrote:
Hi Ben,

The "defaultfocus" is an ASP.NET server-side control attribute, the ASP.NET
runtime will render out clientscript (to set focus) according to this
attribute value. However, the rendering will vary according to the client
browser. I think ASP.NET possibly detect the iehp.exe as a non-javascript
enabled browser and doesn't correctly output script to set focus.

<form id="form1" runat="server" defaultfocus="txtCardID">

You can try checking the source of the output html at client-side to see
whether the ASP.NET has render the same script code as your own custom
script.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 13 '07 #6
Hi John,

What's the " Internet Explorer for Windows CE" you mean? The exe image of
it? So far for Internet explorer, it seems be installed with the windows
OS rather than a separate package. If you want to get a correct copy to
replace a corrupted one, you can consider copy one from another box with
this IE for Wince installed.
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 16 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Carter | last post by:
Suppose I wanted to combine a thin client written in VB6 with a server on a remote machine. Since this is the python group, assume for now that it could be written in python (although VB6 would be...
4
by: Charles Russell | last post by:
I am setting a three column layout within an existing table. The table uses previously devloped code so I am force to use it. I have the following styles defined. <code><!--Preventative insert...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
3
by: Robert Dell | last post by:
I have a problem comparing strings in an order form i'm writing. I want to give a running total at the bottom of the page and it appears to be working except it doesn't compare correctly (it...
3
by: bradwiseathome | last post by:
I focus on controls in a web form like this: <script language="javascript"> var focusControl = null; if (document.getElementById) focusControl = document.getElementById('txtArea1'); else if...
3
by: TC | last post by:
Hello, I am using the script below to open a new window and once opened, redirect to that open window from the original window: private void btnNewPDFWindow_Click(object sender,...
5
by: Kathy Burke | last post by:
Hi, I've used the following javascript structure in other places in my asp.net app, but for this one the pop-up window still goes to the back and doesn't get the focus. button onclick event:...
0
by: mathewgk80 | last post by:
HI all, I am having popup calendar Javascript code. But i dont know how it is connecting to asp.net code.. I am using asp.net,c#.net and also using 3tier architecture with master page.... I...
3
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.