Is there a way to focus on the text box?
i.e. The username in the script below when you click on the username?
<tr> <td valign="middle" class="loginText"> <b> <label for="UserName"> UserName:</label></b> </td> <td valign="middle" > <input type="tel" maxlength="6" value="" name="UserName" id="UserName" data-val-required="The User name field is required." data-val="true" /><br /> @Html.ValidationMessageFor(m => m.UserName) </td> </tr>
It works on Mozilla and IE, but does not work on iPad Safari. Basically, I would like the iPad keyboard to pop up when users click on the ie username shortcut in this scenario:
Here is my jQuery:
$("label[for]").click(function () { var inputid = '#' + $(this).attr('for'); alert(inputid); $(inputid).focus(); });
source share