I hope to get some help on this issue. Some users in IE report this javascript problem, but I could not recreate it.
In fact, for some class of Windows IE users, the game does not work (or $ .ajax () does not work).
What i know:
- I changed the ajax call (ajax_init_trainer) and used the standard link with some request parameters to initialize, and ppl seemed to pass the problem on until it hit the next ajax call.
I read somewhere that IE does crazy caching, so you need to make the URL unique, so I added the _requestno parameter. However, setting the cache: false is also said to do this. This did not fix it for someone who complained.
function done(res, status) {
var data = JSON.parse(res.responseText);
hide_loading();
if (status == "success") {
window.location.href="/bamo/battle/?{{ fb_sig}}";
}
else {
display_alert("Problem!",data.msg,$("#notifications"));
}
};
$(".monster_select_class").click(function() {
$(this).attr("src","{{MEDIA_URL}}/bamo/button_select_click.png");
monster_class = $(this).attr("monster_class");
monster_type = $(this).attr("monster_type");
ajax_init_trainer(monster_class,monster_type);
});
function ajax_init_trainer(trainer_class,monster_type) {
var data = {trainer_class:trainer_class,monster_type:monster_type};
var d = new Date();
var args = { type:"POST",url:"/bamo/api/init_trainer/?_requestno="+d.getTime(),data:data,contentType:"application/json;", dataType: "json",cache:false,complete:done};
$.ajax(args);
return false;
};
source
share