Hi,
got a dynamic dropdown working. Added two more fieldthat i want to populate when I select something in the second DD box. So i added a little JS who should react on a change in the second box:
Had an action added to the onLoad event.
When showing the page source on initial load the JS is loaded after the dynamic dropdown JS.
However when I now select something in the first dropdown box nothing is happening.
What could be here the problem?
got a dynamic dropdown working. Added two more fieldthat i want to populate when I select something in the second DD box. So i added a little JS who should react on a change in the second box:
window.addEvent('load', function() {
document.id('game').addEvent('change', function(){
Request({
url: 'index.php?option=com_chronoforms&chronoform=AJAX_dropdown&event=getTeamGameInfo',
method: 'get',
onRequest: function(){
document.id('hteam').set('text':'Loading...');
document.id('oteam').set('text':'Loading...');
},
onSuccess: function(responseText){
alert('text onSucces');
},
onFailure: function(){
document.id('hteam').set('text':'Loading failed.');
document.id('oteam').set('text':'Loading failed.');
}
}).send();
});
});
Had an action added to the onLoad event.
When showing the page source on initial load the JS is loaded after the dynamic dropdown JS.
However when I now select something in the first dropdown box nothing is happening.
What could be here the problem?