L
L
l_sev2019-04-27 21:11:55
API
l_sev, 2019-04-27 21:11:55

How to solve the problem with Ajax?

Ajax keeps returning the same old data. Even if the variable in the url changes.
I make a request to VK. Regardless of the params value, it always uses the same one.

function request(params){
  $.ajax({
  	type: 'GET',
  	url: 'https://api.vk.com/method/' + params,
  	dataType: 'JSONP',
  	success: function(data) {
    	console.log(data);
  	}
  });
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-04-27
@StockholmSyndrome

I don’t know, I do n’t see this (insert your token and try)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question