Lesson Code: http://www.developphp.com/video/JavaScript/Form-Select-Change-Dynamic-List-Option-Elements-Tutorial
In this Javascript video lesson you will learn how to program dynamic select form list elements. To demonstrate the logic we will show how to change options of a select list based on the selection the user makes from the first list. A web application developer will definitely need to know how to do this when they get into form programming that involves data intake of categories and subcatories from a user.
Original source
34 responses to “Javascript Form Select Change Options Tutorial Dynamic List Elements HTML5”
First let me say how much I appreciate your videos especially after wading through all the entries posted by people who are either unable to speak (who knows, maybe they don’t have microphones or sound cards) Or their English is Sooo heavily accented as to be entirely unintelligible. Simply a useless waste of time. Your videos on the other hand are great, absolutely the best. Not only that, but your code works. I love it.
OK, I’ve been wanting to tell you that for some time. Now to the main point of my comment which is to ask if it may be possible to expand on this video to demonstrate how to save the result of this to a database. It would seem the logical goal to save the “pair” to a variable that can be used elsewhere i.e. like send to DB.
thank you.. sir … you are great . method you fellow to teach is best
Can u please post a video that how to add more data to dropdownlist in angular 2.Suppose I give some string in textbox and press add button then that string should get added in dropdownlist.
this is exactly what I was looking but through ajax……….
i want click 2nd select option in suppose mouse click "corvette" so i should be automatically open pop box, please help me how to make?
very simple concept and good video 🙂
Thank you so much
I see loads of people have asked, and one guy said he managed it but didn't say how – does anyone know how to add a 3rd or even 4th option dependant on the option before it?
God bless you in Jesus Christ's Name amen! i liked the way you explained it!
Adam, please if you will have time in the future, can you add a second part on this video and show us how to keep values in dropdown lists, after form submision?
that is not ease. it much concentration.
Hey..great explanation..But when I tried , I got exception and not working it seems.The exception is "Uncaught TypeError: Cannot read property 'add' of undefined" at this piece of code " s2.options.add(newOption);" please help me on this ..
Hey, I am trying to create an option with the image where you have an image and you click on a particular part in image and the data loads. For Example, I have an image of Car Engine where I click on piston and it gets details on piston. Need to create something like this i.e. selection within image. Can you please let me know on how to do it or any source where i can find it. Thanks in advance
this is exactly what I was looking for… awesome.. good job..
Great video's Now I just have to work out how if you select a radio button it gives you two other list with different $ values then add them thanks
Thank you brother, I love your tutorial n_n you saved my life ajaajaj lol gg
hello sir
pls i want you to help me with html java script sode to create a clickable table
i want if i click the table row, the data should be pass to the form ie,
how to use html table to fill a form
Thanks for sharing, works a treat 🙂
thx a lot…
nice video, thanks you
THANK YOU..!!! it is more helpful and easy to understand……
Great video…love the step by step explanations…made understanding everything kiddie play 🙂
It seems all my confusions can be cleared by you. Thank you.
Hello sorry, but how could I do it, if at the time of selecting an option I would like a reference image, ie if I choose chevy shows chevy options and a right side reference image
thank you for this excelent video please if posible then make m 5 dynamic dependent box in html please do hope that u help me
Thanks for this tutorial, what if we need to dynamically populate select elements three levels deep, also is it possible to populate a value on the third level dependent on a specific value in level 2 ? use case : Campus (Level 1) > Building (Level 2) > Room No (Level 3).
i can add this function in WordPress contact form 7 if this is possible then tell me how can i do this,? Thanks
detailed and to the point explanation.Thanks
How can I enable users to enter a new page when they select an option in the second drop down list?
Amazing video, thanks, help me a lot!!
Thank you 🙂 !
Brilliant tutorial, thank you 🙂
Great video man! this tutorial really helped me.
how to do the same thing but outside of the html, different file ( i mean separate .js from .html ) ??