Dependent Controls Library

Description
Dependent Controls is a library for making dependent drop-downs quickly and easily. It is written in pure ES6 JavaScript / TypeScript and doesn’t have any dependencies. The library supports SELECTs, radio buttons, and any other custom HTML. Any CSS framework can be used for styling.
General Features
- The library supports SELECT drop-downs, radio buttons, and any custom HTML…
- Any CSS framework or custom CSS can be used for styling.
- The library is written in modern ES6 + TypeScript; no dependencies are required.
- It has three data source options: one JSON file, a direct JavaScript object, or a custom function that maximizes flexibility and allows to perform AJAX requests.
- There is local storage, session storage, and cookies support.
- Deep links support.
- Extensive documentation is included.
- It’s possible to have any number of controls on the same page.
- The user ultimately defines all look & feel of the page; The library has minimal CSS styles.

Examples
- Bootstrap CSS Framework DropDown Examples
- Bootstrap CSS Framework Radio Buttons & Switches
- Bootstrap CSS Framework Mixed Controls
- Tailwind CSS Framework DropDown Examples
- Tailwind CSS Framework Radio Buttons & Switches
- Tailwind CSS Framework Mixed Controls
- Bulma CSS Framework Examples
- Foundation CSS Framework Examples
- Pure CSS & AJAX Request
- AJAX example with five nesting levels
- SELECT with <optgroup>
- Drop-Down with Deep Link
Data Sources
The library supports three main data sources:
- Single JSON file. In this case, all data is placed within a single JSON file, which is loaded once on page load.
- Javascript object. This data source is the simplest one. Just create a JavaScript object and pass it to the library via the dataSource property.
- Custom function. The custom function allows to apply any logic and, for example, bring data from the server-side (via AJAX requests).
Storage & Deep Links
The library supports storage to save the current state and restore it after page refresh or when the back button is pressed.
- Local storage – this is persistent storage that keeps data even if the user closes the browser.
- Session storage – it will be cleared when the browser session is over, typically when the user closes the browser.
- Cookies – unlike local and session storage, cookie values can be used on the server too. It’s also possible to define cookies’ expiration date.
- Deep Links – special links that send users directly into the predefined drop-down selection state.
Callbacks & APIs
The library has various callback function that may be used to apply the custom logic:
- onSubmit.
- onReset.
- onChangeStart.
- onChangeEnd.
- onDisableControl.
- onEnableControl.
| Type | JavaScript Script |
|---|---|
| Author | js-ocean |
| Category | Javascript / Forms |
| Price | $7 |
| Sales | 24 |
| Published | Sep 8, 2021 |
| Last Update | Sep 9, 2021 |
| Compatible Browsers | Firefox, Safari, Opera, Chrome, Edge |
| Source Files Included | JavaScript JS, JavaScript JSON, HTML, CSS |
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website · 12,847 views · 46 clicksWebsite · Week 49 · 12,847 views · 46 clicks
🥈
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website · 7,964 views · 10 clicksWebsite · Week 49 · 7,964 views · 10 clicks
🥉
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website · 15,624 views · 28 clicksWebsite · Week 49 · 15,624 views · 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website · 7,784 views · 2 clicksWebsite · Week 49 · 7,784 views · 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website · 7,679 views · 4 clicksWebsite · Week 49 · 7,679 views · 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website · 7,591 views · 0 clicksWebsite · Week 49 · 7,591 views · 0 clicks

