0

the below ajax function is not working and while I am using this one it's blocking other script functions also. I used this function on a link click to modal. I have searched a lot to fix this, but I am unable to fix. anyone could check why this is happening?

AJAX Call :

$(body).ready(function(){
    /////////////// Invoice Link Click - invoice link ID is invoice ////////////////
    $("#invoice").click(function(){

        var rowID=[];

        ///////// Initialize and assign row row value /////////////
        rowID = arrays;

        if(rowID!=''){
            $.ajax({
                url:'<?php echo base_url(); ?>/index.php/Ajax_calls',
                type: POST,
                data:{rowdata:rowID},
                dataType:"JSON",
                success: function(response){
               //////////////// Modala ID is modal-form  ////////////////
                    $('#modal-form').show();

                    ///////// Getting Values from response /////////////
                    var data=response.inv;

                    alert("SUCCESSFULLY RETURNED............!!!!!!!!");
                    }
                });

            }


        });
    });

How to sortout this?

1 Answers1

0

POST needs to be enclosed with quotes

$.ajax({
url:'<?php echo base_url(); ?>/index.php/Ajax_calls',
type: 'POST',
data:{rowdata:rowID},
dataType:"JSON",
success: function(response){
//////////////// Modala ID is modal-form  ////////////////
    $('#modal-form').show();

    ///////// Getting Values from response /////////////
    var data=response.inv;

    alert("SUCCESSFULLY RETURNED............!!!!!!!!");
    }
});
ACD
  • 1,431
  • 1
  • 8
  • 24