Forums

Creating 2 Dropdown Lists using Ajax

pcheng 22 Aug, 2011
Is it possible to create 2 dropdown lists using Ajax?

The code below creates one dropdown list.

$return = JHTML::_('select.genericlist', $options, 'team1',
'class="inputbox required select" size="1" ', 'value', 'text', $default);


Is it possible to create another dropdown using the same $options but with a different name?

$return = JHTML::_('select.genericlist', $options, 'team1',
'class="inputbox required select" size="1" ', 'value', 'text', $default);
$return = JHTML::_('select.genericlist', $options, 'team2',
'class="inputbox required select" size="1" ', 'value', 'text', $default);


Thanks,

Pericles
GreyHead 22 Aug, 2011
Hi Pericles,

You'd need to make sure that you can distinguish between the two pieces of code after it is received as they need to go into different places in your form.

Bob
This topic is locked and no more replies can be posted.