I want to called one API on form load, I added this js code onLoad>
I got alert message 'ready' but after that nothing is happens in my network.
jQuery(document).ready(function ($) {
alert('ready');
$.ajax({
type:'POST',
url: '<?php echo JURI::base();?>baseapi.php',
data: {firstname:firstname},
cache:false,
processData: false,
success:function(data){
alert(data);
console.log(data);
}
});
});
I got alert message 'ready' but after that nothing is happens in my network.