Difference between revisions of "Dependent dropdowns"

From SDU
Jump to: navigation, search
(A possible implementation of dropdowns based on values in other dropdowns)
 
(Introduction)
Line 1: Line 1:
 
 
== Introduction ==
 
== Introduction ==
  
Line 16: Line 15:
 
All these solutions will have advantages and disadvantages (e.g. calling webservices, using AJAX and even the 'hidden frame solution' may work a little slower compared to pre-loading all data. On the other hand, pre-loading data may take a long time if you have hundreds of values)
 
All these solutions will have advantages and disadvantages (e.g. calling webservices, using AJAX and even the 'hidden frame solution' may work a little slower compared to pre-loading all data. On the other hand, pre-loading data may take a long time if you have hundreds of values)
  
 
+
Let's take a look at an implementation that pre-loads all data.
  
 
== Components ==
 
== Components ==

Revision as of 09:48, 24 March 2009

Introduction

On a regular basis, people ask on the forums for a solution implementing dependent dropdowns.

With dependent dropdowns, we mean values in a dropdown are depending on a selection made in an earlier dropdown field.

Since selecting a value in a dropdown is done client-side, at least some part of the solution will include (client-side) javascript coding.

Possible solutions may exist out of these: + use hidden frames to call a custom made HTMPL file containing the values for the next dropdown, then use this data to populate the dropdown in the main window + an AJAX implementation + find a way to call the CA Service Desk web services using javascript, get the necessary values from the server and populate the dropdown + pre-load all data when your form gets loaded, then use javascript to display values when making selections in the dropdowns

All these solutions will have advantages and disadvantages (e.g. calling webservices, using AJAX and even the 'hidden frame solution' may work a little slower compared to pre-loading all data. On the other hand, pre-loading data may take a long time if you have hundreds of values)

Let's take a look at an implementation that pre-loads all data.

Components

All together now