I'm trying to insert the select options tag into my conversation, to make it more simple to the user. I did this:
And in the index.js:
function selected(){
switch($('#selected option:selected').val()){
case 01:
alert("01");
break;
case 02:
alert("02");
break;
}
};
But it doesn't recognize the option selected. I tried without the function selected() (only with switch case), but it didn't worked.. Can somebody help me please? Thanks a lot!
I believe your HTML inside the Advanced context have something you miss.
In your HTML in
onselect
your typed:
, but, for use onselect and call one function you have to useonselect="nameFnction()"
See one simple example inside MDN to use this tag:
Now, see other example for works fine according the choice:
And with jQuery (Your id is select and not selected):