I created js function and now i want that js function to call itself only once, My code is
function view(str){
$.ajax({
type: "POST",
url: '<?php echo base_url()?>index.php/main/'+str+'/',
success: function(output_string){
//i want to call function from here only once like view(str);
}
});
}
. How can i do that ? Thanks in advance, Currently it is showing me infinte loop.