2
I have this select with multiples select
<tr>
<td width="10%" class="label_right">Autorização Prévia: </td>
<td class="label_left">
<select id="ddl_autorizacaoprevia" multiple>
<option value="0">TODAS AS AUTORIZAÇÕES</option>
<option value="T">TÉCNICA / ADMINISTRATIVA</option>
<option value="A">SISTÊMICA</option>
<option value="N">NÃO PRECISA</option>
</select>
</td>
</tr>
What I wish is that when I select "ALL AUTHORISATIONS", all others should be selected and when I click on any other, all the selected ones should be unchecked and only the selected one should be checked (selected). I really don’t know how to do this. I’m looking on the internet, but so far I haven’t found anything.
Thiesen, what is
optSelected
?– pnet
I switched optSelected by option. Selected, but it gives this error:
Uncaught ReferenceError: option is not defined
. I need some include?– pnet
I edited there, actually Voce has to catch the guy who received the click
– Thiesen
Yes, I did that and mark them all, but I can’t just mark one. I select, for example, and when I click on an option, it’s not checked.
– pnet
I resolved.
that.attr('selected', 'selected');
instead of$(that).attr('selected');
– pnet
There is a problem. It does not work in IE and the browser that has to work is IE. Chrome works well.
– pnet
Jquery is cross browser, it must be an old version of IE...
– Thiesen
Version 11.0.24. It’s new my IE. It won’t even go with angry prayer. With F12, it gives an error of: Unspecified error.
– pnet
IE is always a problem friend, no matter the kkk version
– Thiesen
This is a fucking disgrace.
– pnet