A
A
antonio02262017-12-18 19:25:50
AJAX
antonio0226, 2017-12-18 19:25:50

How to correctly send a cross domain ajax request?

Hi all.
There is a form, it has an action that changes dynamically.
You need to send a request using ajax and get a response.
When using this code,

$("#getting").on('click',function(){
           $.ajax({
                url: $('#someFrm').attr('action'),
                type: 'POST',
                dataType: 'jsonp',
                success: function(data){
                    console.log(data.respone);
                }    
            });
   });

Error: Uncaught SyntaxError: Unexpected identifier
Request to: https://acs2.sbrf.ru:443/acs_01b/uidispatcher;jses...
Tell me what is the error.
You need to get a callback.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oh, 2017-12-18
well @AnneSmith

check your code for syntax errors and make sure you get the data you expect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question