Login   Register  
PHP Classes
elePHPant
Icontem

Linked Select: Create dynamically linked lists with select inputs

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2004-03-16 (10 years ago) RSS 2.0 feedStarStarStar 55%Total: 2,753 All time: 1,259 This week: 1,521Down
Version License PHP version Categories  
clinkedselect 1.0GNU General Public Lice...3HTML
Description Author  

This class is meant to create dynamically linked list with form select inputs that work as controls for choosing master and detail options.

The class takes the definitions of lists options for primary select input and the corresponding options that should be made available in the secondary input is selected.

The class generates the HTML for defining both the form input as well the necessary Javascript code to dynamically switch the set options of the secondary input depending on the option of the primary input that is selected.

Innovation Award  
PHP Programming Innovation award nominee
March 2004
Number 7
Sometimes it is necessary to let the users of a Web application make several choices of multiple options, each choice depending on the previous.

Choices of multiple options can be implemented in Web applications with form select inputs. However, if you want to make a second choice control that depends on what was chosen in the first, you need to update the second select input with a different set of options depending on the first option.

The solution to implement this kind of dynamic control of options provided by this class is to generate the necessary Javascript that makes the second select input load a new set of options when the first select input change its currently selected option.

This type of user interface manipulation could be implemented without the need to resort to Javascript, by using additional buttons that the user would have to use every time he changes the first select input, so the server could load an update form with a different set of options in the second select input. However this approach would make the forms less usable than when using the solution provided by this class.

Manuel Lemos
Picture of Setec Astronomy
Name: Setec Astronomy <contact>
Classes: 20 packages by
Country: Italy Italy
Age: ???
All time rank: 141 in Italy Italy
Week rank: 116 Down5 in Italy Italy Down
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Plain text file CLinkedSelect.php Class Main class
Accessible without login Plain text file sample.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,753All time:1,259
 This week:0This week:1,521Down
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:72%StarStarStarStar
Documentation:-
Examples:70%StarStarStarStar
Tests:-
Videos:-
Overall:55%StarStarStar
Rank:1211