Hide/Unhide block according to radio button selection

Hello,

I want to hide/unhide a block according to radio button selection. My code works fine EXCEPT that the initial status of block is active, while I want to be hidden, and appears only when the second radio button is selected. I tried to give style="display:none" to block but this hides it at all:-))
Here is my code:
<input type="radio" checked="checked" name="downloadoption" value="1" onclick="document.getElementById('moreInfo').style.visibility='hidden';" />
Main Download<br />
<input type="radio" name="downloadoption" value="2" onclick="document.getElementById('moreInfo').style.visibility='visible';" />
More Downloads<br />
<div id="moreInfo">
<select name="list" size="10">
..........
</select>
</div>

Thank you
Maria
phpHellasAsked:
Who is Participating?

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

x
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.

theremonCommented:
Kalispera Maria

try the following code - you had it right when you tried using display:none. You just had to use display in your js too, instead of visibility.
<input type="radio" checked="checked" name="downloadoption" value="1" onclick="document.getElementById('moreInfo').style.display='none';" />
Main Download<br />
<input type="radio" name="downloadoption" value="2" onclick="document.getElementById('moreInfo').style.display='block';" />
More Downloads<br />
<div id="moreInfo" style="display:none">
<select name="list" size="10">
..........
</select>
</div>

Open in new window

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
phpHellasAuthor Commented:
Thank you VERYY MUCH!! (Efharistw poly-poly!!)

Maria
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
JScript

From novice to tech pro — start learning today.