Dropdown passing a numeric from the selected text in the box
Posted: Sat Jul 23, 2016 4:20 pm
Hello to All-
I am a noob to this forum and thanks to Mike - I now have some NodeMCUs which are working!
My question is this:
Is there a way that a Dropdown box can be used which would be filled with text, BUT, in which the variable is passed the NUMBER of the text in the Dropdown?
Example, say I have a Dropdown and it is to get the day of the week into var DOW. The box has Sunday, Monday, Tuesday..... Thursday, Friday, Saturday.
I do not want the text going into the Var, just the number which is associated with the selected element in the box.
In my example I selected Wednesday which I want DOW=4 (Sunday being 1).
Is this even possible? Apologies if this is somewhere I did no see.
It is similar to having a LOOKUP or a LOOKDOWN function.......
Regards to All.
I am a noob to this forum and thanks to Mike - I now have some NodeMCUs which are working!
My question is this:
Is there a way that a Dropdown box can be used which would be filled with text, BUT, in which the variable is passed the NUMBER of the text in the Dropdown?
Example, say I have a Dropdown and it is to get the day of the week into var DOW. The box has Sunday, Monday, Tuesday..... Thursday, Friday, Saturday.
I do not want the text going into the Var, just the number which is associated with the selected element in the box.
In my example I selected Wednesday which I want DOW=4 (Sunday being 1).
Is this even possible? Apologies if this is somewhere I did no see.
It is similar to having a LOOKUP or a LOOKDOWN function.......
Regards to All.