Message from JavaScript discussions

October 2020

— It is really awesome and useful

— 

I want to append drop-down value dynamically , when I m doing this drop down value showing multiples times how restrict i.e if there are 2 drop-down values 'A' and 'B' and I selected the first one 'A' then when again I try to select it is showing me 3 drop down in which 2 times 'A' is showing. Why it is happening and how to overcome this?

— You provably have to add a stopPropagation

— Hello everyone.
I need an advice if you don't mind.
I need to convert the following codes:

<select id="switch">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>

To <button> or <a> I don't want the dropdown list. I need them to be separated buttons.

Any ideas??

Thank you very much in advance

Message permanent page

— Yes, just make buttons?

— I mean how should I tag the id and value?

— What backend do you use?

— Js

— If you want the user to go to another page just make it <a> and change the css so they look like buttons

Message permanent page

— Whats the action you want to perform when the user clicks the button?

— Well I could make you knoe <a href> but I don't want to make many pages. I need to change some sentence in the page as the user clicks

Message permanent page

— So you make an onclick function