184
// Do nothing if no products are defined (this avoids the
185
// "a has no properties" error from merge_arrays function)
186
if (f[productfield].length == blank ? 1 : 0) {
184
// if this is the first load and nothing is selected, no need to
190
// if this is the first load and nothing is selected, no need to
185
// merge and sort all components; perl gives it to us sorted.
191
// merge and sort all components; perl gives it to us sorted.
219
for ( var i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
225
for ( var i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
220
sel[sel.length] = f[productfield].options[i].value;
226
sel[sel.length] = f[productfield].options[i].value;
222
single = 0;
228
// If there is only one product, then only one product can be selected
229
single = ( sel.length == 1 );
223
} else {
230
} else {
225
for ( i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {
232
for ( i = blank ? 1 : 0 ; i < f[productfield].length ; i++ ) {