0

I am using jqgrid for my app and it works fine, I just have problem when the jqgrid gets 2 different ajax calls one by one but fast, I want it to just relate to the second ajax call, but it freaks out. Someone have an idea to resolve this?

i can't give a peek on the code, but i mean that he try to reload the data and meanwhile i press anther button and want him to reload anther data instead. i look at Fiddler and the 2 ajax calls gets fine

amir
  • 13
  • 4
  • What do you mean by 2 ajax calls? Maybe a peek at the code? – Hass Feb 13 '13 at 07:42
  • i can't give a peek on the code, but i mean that he try to reload the data and meanwhile i press anther button and want him to reload anther data instead. i look at Fiddler and the 2 ajax calls gets fine. – amir Feb 13 '13 at 07:59

1 Answers1

0

Kill the first request as a part of your second call. See Abort Ajax requests using jQuery as an example of killing an Ajax request.

Community
  • 1
  • 1
Mark
  • 3,123
  • 4
  • 20
  • 31
  • thanks, its may help, but how can i get my previous ajax call so i can call .abort? – amir Feb 13 '13 at 15:50
  • This should be a more specific example to a jqGrid request cancel. http://stackoverflow.com/questions/4016583/how-do-i-add-a-cancel-button-to-my-jqgrid – Mark Feb 13 '13 at 16:27
  • thanks, it's wasn't easy but your answer eventually lead me to the solution. – amir Feb 14 '13 at 08:37