...programmatically, without changing selection of dropdown.
I suposse that will be made with a javascript call to run method of action, but I'm very newbie with Chronoforms until now and need your help.
thanks!
I suposse that will be made with a javascript call to run method of action, but I'm very newbie with Chronoforms until now and need your help.
thanks!
Hi neuronageek,
Looking at the code I think that the call would be load_req.send('name=value');
Bob
Looking at the code I think that the call would be load_req.send('name=value');
Bob
Thanks, Bob.
This is for newbies like me: Example triggering "Ajax Enabled Dropdown [P]" when clicking a button. This helps me to re-use the action to be fired when clicking on button to "see "more info" of one item (really, to see the info loaded by DB Multi record loader).
Thanks!
On Onload (JS) event
This is for newbies like me: Example triggering "Ajax Enabled Dropdown [P]" when clicking a button. This helps me to re-use the action to be fired when clicking on button to "see "more info" of one item (really, to see the info loaded by DB Multi record loader).
Thanks!
On Onload (JS) event
window.addEvent('load', function() {
$('button_id').addEvent('click', function(){
var load_req = new Request(
{
url: 'index.php?option=com_chronoforms&chronoform=form_name&event=event_name[/color]',
method: 'get', onRequest: function(){
$('destinationcontainer_id').empty();
new Element('div', {'value': '', 'text': 'Loading...'}).inject($('destinationcontainer'));
}, onSuccess: function(responseText) {
$('destinationcontainer').empty();
$('destinationcontainer').set('html', responseText);
},
onFailure: function() {
$('destinationcontainer').empty();
new Element('div', {'value': '', 'text': 'Fallo en la carga.'}).inject($('destinationcontainer'));
}
});
load_req.send($('sourcedropdown').get('name')+'='+$('sourcedropdown').get('value'));
});
});
This topic is locked and no more replies can be posted.