Sending information by getJSON

Asked

Viewed 18 times

0

I have a redirect by getJSON, but a few days ago it stopped working for a screen, I can’t find the error. If I put an Alert or a redirect like this : $(Location). attr('href', 'http://sendCobranca.php'); It works, but I need to pass some parameters

$(document).on('click','[name="cobranca"]',function(){
        var tipo = $(this).attr('tipo-cobranca');
        var form = {}
        form['ids'] =  getCheckedValues($('.ck:checked'));
        form['tipo'] = tipo;
         $.getJSON('sendCobranca.php',
            {
                form: form
            },

            function(j){
                if(j){

                }
            });

        // console.log(form);               
    });
  • Can you explain better "stopped working"? shows any error? ajax gets sent?

  • There is no error, nothing happens, to test the button of the form, I put an alert, yes it displays the alert, so I thought it could be problem in the other page, I put an echo "testestsetsetse"; But it did not show, so I made a redirection and goes to the other page. only in this getJSON that nothing happens.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.