Select option needs to change - jquery-mobile

<select name="noofseats" data-native-menu="true">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4<option>
</select>
In the above code I'm not supposed to use data-native-menu , but, if I don't use it I'm unable to select the options on the android screen.
I'm using jquerymobile framework.

jquery mobile alpha4 uses native menus by default.
whatever the cost - update the jquery mobile version you use.
If the problem is that after an AJAX call you can't get options to display correctly - use .page() method.
Details here: http://jquerymobiledictionary.dyndns.org/faq.html

Related

WKWebView interaction not triggering dropDownlist in web page from tag <select> iOS 15.x.x

I'm trying to select a dropDownList in a web page inside my application using WKWebView but it does not respond and could not trigger UIPickerView or DropDownlist in iOS 15.x.x although it works well in iOS 14.x.x and earlier versions.
targeted <select> web snippet
<select name= "hours-defined">
<option value="">00</option>
<option value="">01</option>
<option value="">02</option>
<option value="">03</option>
</select>
How it looks on iOS 14

Creating Simple Dropdown in MVC5 using asp.net

I want to create the following dropdown in asp.net
Week : (dropdown will have options 1,2,3 and 4)
How to create this is MVC5 using ASP.NET ?
(Dont mind using Bootstrap, but the dropdown should be a simple dropdown and not with bootstrap buttons or hyperlinks)
Please help!
First off; do you base your dropdown on a model property, or should it be hardcoded?
If the former, you could use the #Html.DropDownListFor helper (MS Docs).
If the latter, use the following (W3 School):
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>

Phonegap native select

Can I do native select scrolling view with phonegap select box?
<select>
<option value='Agriculture and Fishing'>Agriculture and Fishing</option>
<option value='Mining and Quarrying'>Mining and Quarrying</option>
<option value='Manufacturing'>Manufacturing</option>
</select>
You have available a PickerView plugin
Or you can use this spinning wheel component that is like displayed as native

Placeholders in jQuery Mobile

I know there are placeholders for selects in jQuery Mobile.
<select id="salutation" data-native-menu="false">
<option id="salPlac" data-placeholder="true" value="">Salutation</option>
<option value="Mr.">Mr.</option>
<option value="Ms.">Ms.</option>
<option value="Mrs.">Mrs.</option>
<option value="Dr.">Dr.</option>
<option value="Prof.">Prof.</option>
</select>
But are there similar placeholders for textareas and inputs when using jQuery Mobile?
Like this: (doesnt work)
<textarea type="input" class="regular" id="textBox" data-placeholder="true">Type in here</textarea>
I know they are available in HTML5, but I want to use jQuery Mobile if it's possible.
Thanks.
There is no attribute called "data-placeholder" available for text box and text area in jquery mobile. So you need to use the HTML5 placeholder attribute suggested by Omar.
Here is the link http://view.jquerymobile.com/1.3.1/dist/demos/#ui-page-top

disable a jquery mobile select with knockout

is that possible to disable with knockout a jquery mobile select like this:
<select>
<option value="1">value1</option>
<option value="2">value2</option>
<option value="3">value3</option>
<option value="4">value4</option>
</select>
I tried something like this <select data-bind="attr: {disabled: 'disabled'}"> but doesnt work
You can do it with knockout.js only if select is a native one.
If it is styled with jQM then only way to disable it to use jQuery Mobile function like this:
$('select').selectmenu('disable');
or:
$('select').selectmenu('enable');

Resources