Page 1 of 1

Can I disable a checkbox, when clicking on another checkbox?

Posted: Mon Sep 08, 2014 4:50 am
by simonmlewis
We need to enable a homepage to state if it's banner "expands". However, we also want the admin to be able to tick a box to say if it will appear on the mobile homepage.

Expanding ones won't work on mobile.

So I want it if they click the "expanding" checkbox, then the "mobile" checkbox becomes disabled.

I'm sure it's some form of onclick, but it would need perhaps to work for multiple ones, as there are lots of banners that will need this on the one page.

Re: Can I disable a checkbox, when clicking on another check

Posted: Mon Sep 08, 2014 5:10 am
by simonmlewis
While I am in this code, why is this code causing the box to jump all over the place onmouseover?
It should just expand the box. It flickers with no control at all.

I could do it with a table which works flawlessly, but that's a lot of unnecessary code.

Code: Select all

<div class='home_widebanner' style='background-image: url(/images/pages/25415test.jpg);'>
<a href='/home'><img src='/images/homepagemask.png' border='0' height='188px' name='wide_620' 
onmouseover="wide_620.height='550';"
onmouseout="wide_620.height='188';"></a>
</div>

Re: Can I disable a checkbox, when clicking on another check

Posted: Mon Sep 08, 2014 6:57 am
by Celauran