By timo vogt on
Hello everybody,
im currently stuck with this problem.
I want to call a AJAX page via js (Example)
setInterval(function () {
$.ajax({
type: 'get',
url: settings['basePath'] + 'ajax/drupalcall/notification/',
success: function (data) {
}
});
}, 5000);
The function page function looks like this.
The problem is that the AJAX commands are called but have no effect at all.
<?php
function drupalcom_display_incoming_call($call) {
$commands = array();
$commands[] = ajax_command_replace('#callarea', theme('drupalcom_incomming_call', array('cid' => $call->cid, 'calller' => $call->caller, 'callling' => $call->calling)));
ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
}
?>So my Question is now how i call a ajax page via js so I can use ajax_command.
Thanks for your time and help.
Timo Vogt
Comments
Ajax commands will not work
Ajax commands will not work in a straight ajax call.
Contact me to contract me for D7 -> D10/11 migrations.
Is there another solution ?
Is there another solution ?
I'm want to execute this ajax on a timer.
Workaround:
Workaround:
I created this link within my page
Then in my JavaScript I used the setInterval to click this link.
Just set the display to none so no one sees this link.