fredag 15 oktober 2021 kl. 08:41:19 UTC+2 skrev Jonas Thörnvall:I give it 30 minutes "then i am going idiotic"
I have a dropdown "select option list" holding midi portIDs.
So reading the dropdown i know the name of available midiports.
I can visualy inspect to know the index of the ID i want.
But how can i use the ID to retrieve the index? ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
It is the the index of the Id of element out_portsel i am looking for?
Maybe i am doing it backward but i use the index to select output port.I could probably loop through the id's equal to "x" and read out the index by loop counter.
In this case i know the "id" i want, but want is its index in the dropdownlist?
But it seem a "A BIT IDIOTIC" if there already is a function for retrieving it.
I have a dropdown "select option list" holding midi portIDs.I could probably loop through the id's equal to "x" and read out the index by loop counter.
So reading the dropdown i know the name of available midiports.
I can visualy inspect to know the index of the ID i want.
But how can i use the ID to retrieve the index? ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
It is the the index of the Id of element out_portsel i am looking for?
Maybe i am doing it backward but i use the index to select output port.
In this case i know the "id" i want, but want is its index in the dropdownlist?
fredag 15 oktober 2021 kl. 08:47:50 UTC+2 skrev Jonas Thörnvall:Ok this is how it ended up.
fredag 15 oktober 2021 kl. 08:41:19 UTC+2 skrev Jonas Thörnvall:
I have a dropdown "select option list" holding midi portIDs.
So reading the dropdown i know the name of available midiports.
I can visualy inspect to know the index of the ID i want.
But how can i use the ID to retrieve the index? ctrlportindex=parent.document.getElementById("parent.out_portsel").value // "FW1884 Control"
It is the the index of the Id of element out_portsel i am looking for?
I give it 30 minutes "then i am going idiotic"Maybe i am doing it backward but i use the index to select output port. In this case i know the "id" i want, but want is its index in the dropdownlist?I could probably loop through the id's equal to "x" and read out the index by loop counter.
But it seem a "A BIT IDIOTIC" if there already is a function for retrieving it.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 344 |
Nodes: | 16 (2 / 14) |
Uptime: | 40:11:02 |
Calls: | 7,524 |
Files: | 12,713 |
Messages: | 5,643,297 |