Relative Content

Tag Archive for javascripthtmllistdropdownsublist

code not performing as desired and generating an item both as a list and a sublist item

I am trying to figure out what is going wrong with my code. so you click an item on the dropdown, then click the button and it adds it to a list on the right, once the item is on the right i have the option to add a note to it. The problem im facing is that the note will add the text as a main list item and as a sublist item when i only want it as a sublist item for the note option. i have tried messing with my note button, the generate bulleted list function, and the add items to list function but i feel like im overlooking something. i tried turning to chatgpt to see if it could fix my issue but after a couple script changes it was unable to and managed to add a second note button once the first is pressed. can anyone look at my code and tell me what im doing wrong?