Ich habe eine Anforderung wie wenn wir auf eine Option aus einem Dropdown klicken, müssen Sie zu einem Textfeld scrollen. Um dies zu erreichen, verwenden wir die Fokusfunktion in jQuery, die in allen Android-Geräten und sogar in Desktop ios funktioniert, aber auch nicht in iPhone 6 funktioniert. Bitte schlagen Sie hier eine Lösung vor.jquery Fokusfunktion funktioniert nicht in iphone
Dropdown html:
<select data-val="true" data-val-required="X Field is required." id="bnkdtls-mthd1" name="FinancialInformation.PreferredUsdAccount" onchange="validateusd();" aria-required="true" aria-describedby="bnkdtls-mthd1-error" class="valid" aria-invalid="false"><option value="">CHOOSE A METHOD</option>
<option value="2">USD Wire Transfer</option>
<option value="3">USD Check to Address</option>
</select>
jquery für Änderungsereignis
$("#bankdtls").on('change', '#bnkdtls-mthd1', function() {
if ($(this).val() == "") {
DisableUSDSection();
DisablePrizeMoneySection();
}
if ($(this).val() == "2") {
//DisablePrizeMoneySection();
EnableUSDSection();
$(".usdbnknm input").focus();
}
if ($(this).val() == "3") {
DisableUSDSection();
$(".przemnymladrs input").focus()
}
});
Ziel textbot html:
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 textbox1 paddinglftryt0 usdbnknm">
<input class="textbox-input1 valid" id="FinancialInformation_UsdBankName" name="FinancialInformation.UsdBankName" onkeyup="validateUSDBankName();" type="text" value="bank" aria-invalid="false">
<div class="valdtnerror-message" id="USDBankNamevaldtnID" style="display: none;">This field cannot be blank</div>
<div class="valdtnerror-message" id="USDBankNamelenvaldtnID" style="display: none;">Bank Name cannot be more than 45 characters</div>
</div>
Hallo @scgough, vielen Dank für ur Antwort. Aber muss das Eingabefeld mit dem Cursor in der entsprechenden Textbox fokussiert werden und die Tastatur sollte pop-up sein. –