Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

JavaScript Checkbox control HIDE or SHOW Drop-Down List, list of Checkbox controls list of DDL

views
     
TSvearn27
post Apr 15 2010, 05:07 PM, updated 16y ago

Doink! Doink! Doink!
*******
Senior Member
7,284 posts

Joined: Jan 2003
From: Hong Kong / Malaysia




Greetings fellow codemasters from LYN smile.gif

I need a little help here from fellow gurus and would be appreciating any input.

I'm trying to generate a list of checkbox and another list of drop-down list.

By using Javascript, I can control checking the checkbox will show the drop-down list, vice versa unchecking it will hide the drop-down list. But, so far I only managed to achieve if 1 checkbox VS 1 drop-down list.

How can I actually achieve this for a list of dynamic generated checkbox and drop-down box through loop?

I think there is a way to do it would be passing the ID of the checkbox to the javascript function and then will disable the drop-down box controlled by that ID, but still no luck in getting the actual working code.

Anyone could please share and help me here? Deeply appreciate your effort. Thank you smile.gif

P/S: Enable and Disable will work as well. I'm generating the page with PHP and adding in javascript function.
TSvearn27
post Apr 15 2010, 10:39 PM

Doink! Doink! Doink!
*******
Senior Member
7,284 posts

Joined: Jan 2003
From: Hong Kong / Malaysia




I'm just on plain HTML, PHP and Javascript smile.gif

Yes, please do share with me your example of code. I would deeply appreciate it.

 

Change to:
| Lo-Fi Version
0.0179sec    0.48    6 queries    GZIP Disabled
Time is now: 28th November 2025 - 11:00 PM