Need to get selected option from Select component

Susai

I am using Ember component. In that one select and button available. My aim is to alert the selected options in the select element when clicking the button.

Code is here : http://jsbin.com/uQOWiqIk/1/edit

In the code, component repeated two times. When i click the button, the selected options in the particular component only need to be displayed. But in my code, it displays selected options of select element from all repeated components. How can i achieve this ?

Kingpin2k

I'd recommend using ember select, it'll be a much cleaner way of integrating with the ui. That aside, just for learning sake, if you use this.$, it will scope to your current view/component.

var t=this.$('select option:selected');
alert(t.text());

http://jsbin.com/uQOWiqIk/2/edit

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Need to get selected option from Select component

From Dev

Get selected option value from specific select

From Dev

Get selected option from select with angular JS and ionic

From Dev

How to get attribute from selected option of select in jQuery?

From Dev

jsoup - get selected option from html select's options

From Dev

How to get all selected values from multiple select option?

From Dev

Get optGroup id from selected option in select2

From Dev

Get selected option from the tag <select> in php to use on if

From Dev

How to get the selected option value from select inside div

From Dev

Get the text from a selected option

From Dev

Get text from selected option

From Dev

Get the selected component from a JPanel

From Java

jquery select change event get selected option

From Dev

How to get selected option in angular <select>

From Dev

Select2 Get selected option data

From Dev

How to get the option value of selected in Select dropdown

From Dev

Select option selected an not selected

From Dev

Remove selected option from another select box

From Dev

Render select Tag from jQuery Ajax , then get the value from selected option

From Dev

AngularJS select seems to need to match on the same object to set the selected option

From Dev

AngularJS select seems to need to match on the same object to set the selected option

From Dev

How to get selected text of a select in a vue component

From Dev

Get select box option before the currently selected option

From Dev

Displaying selected option from database in a select option tag

From Dev

Displaying selected option from database in a select option tag

From Java

jQuery Get Selected Option From Dropdown

From Dev

How to remove selected option from the option list in select2 multiselect and show selected options in the order they are selected

From Dev

How to get selected option in change callback of AngularDart component

From Dev

Make <select> option selected

Related Related

  1. 1

    Need to get selected option from Select component

  2. 2

    Get selected option value from specific select

  3. 3

    Get selected option from select with angular JS and ionic

  4. 4

    How to get attribute from selected option of select in jQuery?

  5. 5

    jsoup - get selected option from html select's options

  6. 6

    How to get all selected values from multiple select option?

  7. 7

    Get optGroup id from selected option in select2

  8. 8

    Get selected option from the tag <select> in php to use on if

  9. 9

    How to get the selected option value from select inside div

  10. 10

    Get the text from a selected option

  11. 11

    Get text from selected option

  12. 12

    Get the selected component from a JPanel

  13. 13

    jquery select change event get selected option

  14. 14

    How to get selected option in angular <select>

  15. 15

    Select2 Get selected option data

  16. 16

    How to get the option value of selected in Select dropdown

  17. 17

    Select option selected an not selected

  18. 18

    Remove selected option from another select box

  19. 19

    Render select Tag from jQuery Ajax , then get the value from selected option

  20. 20

    AngularJS select seems to need to match on the same object to set the selected option

  21. 21

    AngularJS select seems to need to match on the same object to set the selected option

  22. 22

    How to get selected text of a select in a vue component

  23. 23

    Get select box option before the currently selected option

  24. 24

    Displaying selected option from database in a select option tag

  25. 25

    Displaying selected option from database in a select option tag

  26. 26

    jQuery Get Selected Option From Dropdown

  27. 27

    How to remove selected option from the option list in select2 multiselect and show selected options in the order they are selected

  28. 28

    How to get selected option in change callback of AngularDart component

  29. 29

    Make <select> option selected

HotTag

Archive