There is a request that is sent to a foreign site and transmits the value of the variable gett via the URL, the foreign site knows nothing about me. Then parsim content from the diva (what is in the callback). After the success request is not executed, although in the Chrome debugger you can see the page, swears at the Unexpected token. If I add error, it will go to error after executing the request.
function jsonp_callback(){ $('#what_i_want').val(); } $.ajax({ dataType: 'jsonp', jsonp: 'jsonp_callback', url: 'http://domen.ru/'+$('#my_input').val()+'.html', success: function (data) { alert('jsonp'); } });
What is wrong doing? I read the docks and did not fully understand whether JSONP is suitable in my case or not, in the sense that the FOREIGN site "does not know me" and does not give me any JSON server.