Link to home
Start Free TrialLog in
Avatar of lulu50
lulu50Flag for United States of America

asked on

unselect multi select

Hi,

I have a multi select box that I want when the user click on the radio button it will unselect the items from the box.

this is what I have:

<label style="display: inline-block;margin-bottom: 5px;" title="Generate this report by Name" onclick="ClearSelection();">
                        <input type="radio" name="CategoryType" checked id="CategoryType" value="Name"/>
                      Name</label>


<select name="SelectName" id="SelectName" style="width: 230px; height: 100px;" multiple="">
 <OPTION value=646655>smith, joe- (646655)</OPTION> 
<OPTION selected value=6543334>knighty, Mighty- (6543334)</OPTION> 
</select>

function ClearSelection();
{

//Here I want to say if they are selected then unselect them. 
   $("#SelectName option").prop("selected", false);
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Randy Poole
Randy Poole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lulu50

ASKER

Thank you Randy!!!!!!!!
Avatar of lulu50

ASKER

Thank you
Anytime :)