资 源 简 介
Purpose: Generate two dependent HTML form select inputs
The Basic requirement for me to write a class of this kind is to avoid the page reloading time, when the currently selected value on the first dropdown determine the option values that are made available on the second dropdown.
When the page needs to be reloaded it is not pleasant for the users to wait until the page reload is complete, especially when their Internet to the server is slow.
So what this class does is to generate Javascript code dynamically by fetching the select input option values from a database table and switch them when the user changes the parent select input.
The class has two basic functions where one is responsible for querying the database and other is responsible for generating the Javascript code.
There is also a function which is responsible for generating the HTML code for the select input.