using the focus event

// Expert user has replied.
B Brian Smith 2 years 11 months ago
1 2 0

When I have static controls on my webpage I am able to set the focus to a control using the following:
 
       @Html.TextBoxFor(m => m.UserName, new{  id = "usertxtId",
                                              autofocus = "autofocus",
                                               Style = "background-color:gray;color:black;font-size:2em;width:100%"
                                              })
 
 

    $(function ()
    {
        $("#usertxtId").focus();
        $('#usertxtId').get(0).focus();
    });

   
However when I am dynamically creating controls This is not working ... at one point I had it so the control would get highlighted, but the form would not allow me to enter data... I had to remove several conflicting libraries (jquery mobile) and now this no longer works.
 
For my dynamic controls I am using the same code model as the static (see above) ... but it is not working...

Please register or login to post a reply

2 Replies

S Sabir Valappil Thattath

Dear Brian Smith,

I am waiting for your inputs. There is a known focus issue on EnterpriseBrowser 1.5 with WM/CE devices.
There is a patch available for the same. if your issue falls under EB1.5 and wm/ce devices, please contact the support team for the patch.
Otherwise please provide more details on the device and EB version that you are using.

Thanks & Regards,
Sabir VT

S Sabir Valappil Thattath

which version of the EB are you using? Also on which Device and OS used?

CONTACT
Can’t find what you’re looking for?