Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,547 members, 7,955,029 topics. Date: Saturday, 21 September 2024 at 02:56 PM |
Nairaland Forum / Science/Technology / Programming / How To Get The Selected Values From Many Options Using Javascript (893 Views)
Getting The N-largest Values From A Dataframe With Grouping - Youtube Video / How To Display Uploaded Image In Html Using Javascript / How To Upload Files To Firebase Cloud Storage Using Javascript (2) (3) (4)
How To Get The Selected Values From Many Options Using Javascript by AloyalNigerian(m): 1:42pm On Oct 21, 2019 |
Hi all, I am working on a personal project that requires me to grab the value selected by the user from the drop-down and use that value to in another place probably to display it as a text.
I was getting errors stating that it can't find the value of undefined. I even tried to see if the eventlistener is working perfectly, and it is. This issue is giving me tough time even though I am using the value on the same page, imagine whta I am going through trying to use a grabbed value in another page. I am so sorry if my question is not clear enough but you can always ask for more clarification. Thanks in advance. |
Re: How To Get The Selected Values From Many Options Using Javascript by afuye(m): 2:15pm On Oct 21, 2019 |
Drop ur number lemme call u |
Re: How To Get The Selected Values From Many Options Using Javascript by AloyalNigerian(m): 2:29pm On Oct 21, 2019 |
afuye: Is that your number on your signature? |
Re: How To Get The Selected Values From Many Options Using Javascript by afuye(m): 4:12pm On Oct 21, 2019 |
Yeah AloyalNigerian: |
Re: How To Get The Selected Values From Many Options Using Javascript by stanliwise(m): 11:09pm On Oct 21, 2019 |
AloyalNigerian: Here is an example HTML CODE <select id = "ddlViewBy" > <option value ="1" >test1 </option> <option value ="2" selected ="selected" > test2 </ <option value ="3" >test3 </option> </select> Running this code: let target= document.getElementById( "ddlViewBy" ); let value = target.options[target.selectedIndex].value; 1 Like |
(1) (Reply)
How Artificial Intelligence Can Transform Software Development / Looking For Old Nigerian Google Ads Account / Turn Google Sheet To Cloud Storage,perform CRUD Operation-android Development
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |