1 Replies - 849 Views - Last Post: 18 June 2010 - 05:07 AM

#1 tuxx223   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 10-February 10

Radio button dependent checkboxes

Posted 15 June 2010 - 08:37 AM

Hi guys!

I'm basic user of HTML and Javascript. I want to make put a series of checkboxes under radio buttons.

For example:

Radio button 1:Smartphones
Checkbox #1: Android
Checkbox #2: iPhone
Chckbox #3: Symbian

Radio button 2:Entry level phones
Checkbox #1: Nokia
Checkbox #2: Samsung
Checkbox #3: Huawei

So if smartphones is checked then only user should be able to check android or other options otherwise those checkboxes should be disabled (i.e when user selects entry level phones). Can I do that using Javascript? I just want some basic idea on it.

Is This A Good Question/Topic? 0
  • +

Replies To: Radio button dependent checkboxes

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4297
  • View blog
  • Posts: 13,637
  • Joined: 08-June 10

Re: Radio button dependent checkboxes

Posted 18 June 2010 - 05:07 AM

sure you can do that. all you need is an event handler on the radio buttons, that enables the appropriate checkboxes (i.e. set the checkboxes’ .disabled property from true (obviously, you have to disable the checkboxes by setting the "disabled" HTML attribute first) to false)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1