Problem with Focus method with iehp.exe on thin client

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9obiBBdXN0aW4=?=, Apr 10, 2007.

  1. 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
     
    =?Utf-8?B?Sm9obiBBdXN0aW4=?=, Apr 10, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?Sm9obiBBdXN0aW4=?=

    Ben Rush Guest

    Try this and let me know what it does:

    http://www.ben-rush.net/blog/PermaLink.aspx?guid=14a93c04-cbdf-4ece-a342-1cb9ed8c499a&dotnet

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

    --
    ~~~~~~~~~~~
    Ben Rush
    http://www.ben-rush.net/blog


    "John Austin" <> wrote in message
    news:...
    > 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
     
    Ben Rush, Apr 11, 2007
    #2
    1. Advertising

  3. 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.
     
    Steven Cheng[MSFT], Apr 11, 2007
    #3
  4. 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/PermaLink.aspx?guid=14a93c04-cbdf-4ece-a342-1cb9ed8c499a&dotnet
    >
    > If JavaScript is truly enabled, then something like that should work for
    > you.
    >
    > --
    > ~~~~~~~~~~~
    > Ben Rush
    > http://www.ben-rush.net/blog
    >
    >
    > "John Austin" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    =?Utf-8?B?Sm9obiBBdXN0aW4=?=, Apr 12, 2007
    #4
  5. 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.
     
    Steven Cheng[MSFT], Apr 13, 2007
    #5
  6. 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.
    >
    >
     
    =?Utf-8?B?Sm9obiBBdXN0aW4=?=, Apr 13, 2007
    #6
  7. 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.
     
    Steven Cheng[MSFT], Apr 16, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russ
    Replies:
    1
    Views:
    563
    =?Utf-8?B?Q2hhcmxlcyBDaGVu?=
    Nov 29, 2004
  2. terry

    Thin client

    terry, Aug 2, 2003, in forum: Java
    Replies:
    5
    Views:
    486
    Chris Smith
    Aug 10, 2003
  3. John

    thin client requirement

    John, Sep 17, 2003, in forum: Java
    Replies:
    1
    Views:
    370
    Mark Voorberg
    Sep 18, 2003
  4. steve
    Replies:
    10
    Views:
    1,293
    stefoid
    Dec 14, 2004
  5. Roger
    Replies:
    3
    Views:
    336
Loading...

Share This Page