jQWidgets Forums
jQuery UI Widgets › Forums › Lists › DropDownList › Event is not fired if the jqxDropDownList is initiated from the Select tag
Tagged: DropDownList
This topic contains 8 replies, has 3 voices, and was last updated by Desai Vatsal 8 years, 5 months ago.
-
Author
-
September 19, 2014 at 3:22 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59738
Hello,
Creating a jqxDropDownList from a Select tag is a good idea and I thank for that. However, it seems that no event is fired if the jqxDropDownList is initiated from the Select tag.
Here is a simple code:
<select id=”jqxDropDownList” name=”jqxDropDownList”>
<option value=”S”>S</option>
<option value=”M”>M</option>
<option value=”L”>L</option>
<option value=”XL”>XL</option>
<option value=”XXL”>XXL</option>
</select>// Create a jqxDropDownList
$(“#jqxDropDownList”).jqxDropDownList({
theme: ‘energyblue’
});
$(‘#jqxDropDownList’).on(‘select’, function (event) {
var args = event.args;
if (args) {
// index represents the item’s index.
var index = args.index;
var item = args.item;
// get item’s label and value.
var label = item.label;
var value = item.value;
alert(“label: ” + label);
}
});Please kindly look at this problem and let me know how to fire an event from a select-tag-based DropDownList.
Regards,
Long
September 19, 2014 at 3:31 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59739Hello,
Here is some more information from my side:
– jQuery version: 1.10.2
– jQWidgets version: 3.5.0
– Device type(PC, Mobile): PC
– Browser name and version: IE 11, Chrome 28.0.1500.72Regards,
Long
September 19, 2014 at 4:07 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59742Hi Long,
You can use this:
` $(“#Country”).jqxDropDownList({ width: 300, height: 25 });
$(“#Country_jqxDropDownList”).on(‘select’, function (event) {});`
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/September 19, 2014 at 4:49 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59748Hello Peter,
Thanks for the information. I have followed your advice but it still does not work. Please help check it at http://jsfiddle.net/p4c2agam/3/.
Regards,
Long
September 19, 2014 at 5:55 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59754Hi Long,
The jQuery Selector in the sample was wrong. Please, check the updated one: http://jsfiddle.net/te2qhzrb/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/September 19, 2014 at 6:27 am Event is not fired if the jqxDropDownList is initiated from the Select tag #59758Hello Peter,
Ah, I see. The quotation mark causes the problem.
Thank you very much for your help.
Regards,
Long
December 28, 2016 at 11:29 am Event is not fired if the jqxDropDownList is initiated from the Select tag #90155Hi,
I have same problem in my project. In your example I still can’t see the select event is triggering.
Please see http://jsfiddle.net/te2qhzrb/5/
I put alert on select event but when I select another item from drop down, nothing happens.
Please help.
Regards,
VatsalDecember 29, 2016 at 2:36 pm Event is not fired if the jqxDropDownList is initiated from the Select tag #90184Hi Vatsal,
You’re not using the correct ID to bind to the event correctly. http://jsfiddle.net/dqb8mxc3/
Regards,
PeterDecember 29, 2016 at 5:41 pm Event is not fired if the jqxDropDownList is initiated from the Select tag #90190ok, got it.
Thanks for your help.
-
AuthorPosts
You must be logged in to reply to this topic.