$.ajax and the same domain

$.ajax and the same domain

Hello everybody,


I have a little issue with the use of jQuery and a call with the method Ajax.

The problem appears with IE7 when I call just after the page was loaded. If I wait 2/3secondes, I don't have this beautiful message :


Access denied.




My call ajax process to the same domain that the source page. I call the function when the DOM is loaded with the function  $(document).ready();

That's my code :
  1. $(document).ready(
  2. function()
  3. {
  4. if($('#no_result').length){
  5. }else {
  6. var timer;
  7. $("#tabCollab tbody tr[id!=tabEntete]").hover(
  8. function()
  9. {
  10. var number = $(this).find("span[id*='number']").html();
  11. timer=setTimeout(function(){
  12. //ajout du loading
  13.    $('#infos_utiles').html('<p id="loading" align="center"><img src="'+ROOT_URL+'/images/common/loading.gif" /></p>');
  14.     
  15.    $.ajax({
  16.       type: "POST",
  17.       url: ROOT_URL+"/ajax/collabgetinfos/"+(Math.random()*99999),
  18.       cache: false,
  19.       data: {use_number:number},
  20.       dataType : "json",
  21.       success: function(data){
  22.       $('#loading').remove();
  23.                obj = window.eval(data);
  24.                 
  25.                $('#infos_utiles').prepend("<ul><li>Projets : <span id='infos_projets'></span></li><li>Compétences majeures : <span id='infos_competences'></span></li></ul>");                 
  26.                // Update des projets
  27.                if(obj.projets){
  28.                 var listeProjets = obj.projets.join(',');                
  29.                 $('#infos_projets').prepend("<span>"+listeProjets+"</span>");     
  30.                }
  31.                else
  32.                 $('#infos_projets').html("Aucun");  
  33.       },
  34.       error : function(data){
  35.       $('#loading').remove();
  36.       $('#infos_utiles').prepend("<p>Une erreur est survenue lors de la requête. Veuillez recharger la page.</p>");
  37.       }
  38.     });
  39. },1500);
  40.     
  41. },
  42. function()
  43. {
  44. clearTimeout(timer);
  45. }
  46. )
  47. }
  48. });


The method was called approx. 1,5seconde after the mouse is over a cell of the table. The options are cache:false and I add a generated number after the URL to have an unique URL.

On Google Chrome, it's works. On IE, that's works only if i wait 3secondes forward the call.
.
Someone can help me ?

Thanks

Louis

ps : sorry for my english