deselect selected item from select box

I have a select box that is activated/deactivated by a check box selection, when the user deacivates the selectbox by unchecking the checkbox i want to clear any selections they have made, that is deselect the selected item so that there is no hightlighted item.
i have tried
obj.selectedIndex=false; // selects first item in list
obj.selectedIndex=0;      // selects first item in list
obj.selectedIndex=-1;    // selects first item in list

obj.options[obj.selectedIndex].selected=false; no results

sorry about the cheap points it's all i have left
LVL 25
James RodgersWeb Applications DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

that should work, but you may try this:

selObj.selectedIndex =- 1;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
... but I suspect something else is going on.  Can you show us the code you are using on the checkbox to deselect the item?
should be something like this:

<INPUT type="checkbox" name="mycb" onclick="if(!this.checked)this.form.nameOfTheSelect.selectedIndex=-1;" />
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

this what you looking for?
function deSelect(selObj)
  selObj.options[0].selected = true;
  selObj.options[selObj.selectedIndex].selected = false

<form name='a'>
<input type="checkbox" onclick='if (!this.checked) deSelect(this.form.c)'>
<select name="c">
<option selected>Select something</option>
James RodgersWeb Applications DeveloperAuthor Commented:
this is my checkbox

<input type="checkbox" value="3" name="optChange3" onclick="if(this.checked)document.frmAddPosition.selEmpList.disabled=false; else {document.frmAddPosition.selEmpList.options[document.frmAddPosition.selEmpList.selectedIndex].selected=false; document.frmAddPosition.selEmpList.disabled=true;}">Edit position holder<br>
so? call the function & make the necessary changes
James RodgersWeb Applications DeveloperAuthor Commented:
tried your code with same results

first item in option list is selected and remains selected.


i am going to try your first answer to see if the focus, blur results in the solution i need

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.