Michael24680
Member
Hello,
by the custom buttons, you have a code example for php_standard.
But how works php_ajax?
Normaly I create an xmlhttp object an send the information to my php file, e.g:
[pre]
xmlhttp=new XMLHttpRequest();
url = new URL('https://www.demo.com/entwicklung/dadabik/include/custom_php_files/empfaenger.php' );
url.searchParams.set('q', 'Hallo');
xmlhttp.open("GET",url,true);
xmlhttp.send();
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("output").innerHTML=xmlhttp.response;
}
}
[/pre]
How can I write this code in DaDaBIK? Must I put this code in custom_functions.js?
Thanks!
Michael
by the custom buttons, you have a code example for php_standard.
But how works php_ajax?
Normaly I create an xmlhttp object an send the information to my php file, e.g:
[pre]
xmlhttp=new XMLHttpRequest();
url = new URL('https://www.demo.com/entwicklung/dadabik/include/custom_php_files/empfaenger.php' );
url.searchParams.set('q', 'Hallo');
xmlhttp.open("GET",url,true);
xmlhttp.send();
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("output").innerHTML=xmlhttp.response;
}
}
[/pre]
How can I write this code in DaDaBIK? Must I put this code in custom_functions.js?
Thanks!
Michael